docstr: Given a corner coordinate, a patch_shape, and some input_data, returns a patch or array of patches.
          
docstr_tok: ["Given","a","corner","coordinate",",","a","patch_shape",",","and","some","input_data",",","returns","a","patch","or","array","of","patches","."]
code: def grab_patch(self, input_data, corner_list):
      """Given a corner coordinate, a patch_shape, and some input_data, returns a patch or array of patches."""
  
      output_patches_shape = (
          corner_list.shape[0],
      ) + self.input_patch_shape[1:]
      output_patches = np.zeros((output_patches_shape))
  
      for corner_idx, corner in enumerate(corner_list):
          output_slice = [slice(None)] * input_data.ndim  # Weird
          for idx, dim in enumerate(self.patch_dimensions):
              output_slice[dim] = slice(
                  corner[idx] - self.input_patch_shape[dim] // 2,
                  corner[idx] + self.input_patch_shape[dim] // 2,
                  1,
              )
  
          output_patches[corner_idx, ...] = input_data[
              tuple(output_slice)
          ]
  
      return output_patches
  
file_path: DeepNeuro/deepneuro/outputs/segmentation.py
imports: import numpy
  from deepneuro.outputs.inference import ModelInference
  from deepneuro.utilities.util import add_parameter, docker_print
label_desc: Use image node_id 8 for calling the PatchesInference obj's underlying member method code with example usage: obj.grab_patch(input_data, corner_list) and returns: output_patches