code: def center_crop(layer, max_height, max_width):
      batch_size, n_channels, layer_height, layer_width = layer.size()
      xy1 = (layer_width - max_width) // 2
      xy2 = (layer_height - max_height) // 2
      return layer[
          :, :, xy2 : (xy2 + max_height), xy1 : (xy1 + max_width)
      ]
  
imports: import torch
  import torch.functional
  import torch.nn
label_desc: Use image node_id 1 for calling a global function with example usage: center_crop(layer, max_height, max_width) and returns: layer