code: def insert_patch(self, input_data, patches, corner_list):
      # Some ineffeciencies in the function. TODO: come back and rewrite.
  
      for corner_idx, corner in enumerate(corner_list):
          insert_slice = [slice(None)] * input_data.ndim  # Weird
          for idx, dim in enumerate(self.output_patch_dimensions):
              # Might not work for odd-shaped patches; check.
              insert_slice[dim] = slice(
                  corner[idx] - self.output_patch_shape[dim] // 2,
                  corner[idx] + self.output_patch_shape[dim] // 2,
                  1,
              )
  
          insert_patch = patches[corner_idx, ...]
          if not np.array_equal(
              np.take(
                  self.output_patch_shape, self.output_patch_dimensions
              ),
              np.take(self.input_patch_shape, self.patch_dimensions),
          ):  # Necessary if statement?
              patch_slice = [slice(None)] * insert_patch.ndim  # Weird
              for idx, dim in enumerate(self.output_patch_dimensions):
                  # Might not work for odd-shaped patches; check.
                  patch_slice[dim] = slice(
                      (
                          self.input_patch_shape[dim]
                          - self.output_patch_shape[dim]
                      )
                      // 2,
                      -(
                          self.input_patch_shape[dim]
                          - self.output_patch_shape[dim]
                      )
                      // 2,
                      1,
                  )
  
              insert_patch = insert_patch[tuple(patch_slice)]
  
          input_data[tuple(insert_slice)] = insert_patch
  
      return input_data
  
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 9 for calling the PatchesInference obj's underlying member method code with example usage: obj.insert_patch(input_data, patches, corner_list) and returns: input_data