docstr: Summary
  
  Parameters
  ----------
  input_data : TYPE
      Description
  model : None, optional
      Description
  
  Returns
  -------
  TYPE
      Description
docstr_tok: ["Summary","Parameters","--","--","--","--","--","input_data",":","TYPE","Description","model",":","None",",","optional","Description","Returns","--","--","--","-","TYPE","Description"]
code: def process_case(self, input_data, model=None):
      """Summary
  
      Parameters
      ----------
      input_data : TYPE
          Description
      model : None, optional
          Description
  
      Returns
      -------
      TYPE
          Description
      """
  
      input_data = input_data[self.lead_key]
  
      if model is not None:
          self.model = model
  
      if self.channels_first:
          input_data = np.swapaxes(input_data, 1, -1)
  
      if self.input_channels is not None:
          input_data = np.take(
              input_data, self.input_channels, self.channels_dim
          )
  
      self.output_shape = [1] + list(self.model.model_output_shape)[
          1:
      ]  # Weird
  
      output_data = self.predict(input_data)
  
      if self.output_channels is not None:
          output_data = np.take(
              output_data, self.output_channels, self.channels_dim
          )
  
      # Will fail for time-data.
      if self.channels_first:
          output_data = np.swapaxes(output_data, 1, -1)
  
      self.return_objects.append(output_data)
  
      return output_data
  
file_path: DeepNeuro/deepneuro/outputs/inference.py
imports: import numpy
  from deepneuro.outputs.output import Output
  from deepneuro.utilities.util import add_parameter
label_desc: Use image node_id 2 for calling the ModelInference obj's underlying member method code with example usage: obj.process_case(input_data, model) and returns: output_data