code: def save_to_disk(self, input_data, output_filenames, raw_data):
      for batch_idx, batch in enumerate(input_data):
          # Squeeze data here covers for user errors, but could result in unintended outcomes.
          output_shape = batch.shape
          batch = np.squeeze(batch)
          input_affine = raw_data[self.lead_key + "_affine"][batch_idx]
  
          output_filename = output_filenames[batch_idx]
          return_filenames = []
  
          # If there is only one channel, only save one file. Otherwise, attempt to stack outputs or save
          # separate files.
          if (
              output_shape[-1] == 1
              or (output_shape[-1] == 3 and batch.ndim == 3)
              or self.stack_outputs
          ):
              self.return_filenames += [
                  save_data(
                      batch,
                      output_filename,
                      reference_data=input_affine,
                  )
              ]
          else:
              for channel in range(output_shape[-1]):
                  return_filenames += [
                      save_data(
                          batch[..., channel],
                          replace_suffix(
                              output_filename,
                              input_suffix="",
                              output_suffix="_channel_" + str(channel),
                          ),
                          reference_data=input_affine,
                      )
                  ]
              self.return_filenames += [return_filenames]
  
      return
  
imports: import os
  import csv
  import numpy
  from collections import defaultdict
  from deepneuro.utilities.conversion import save_data
  from deepneuro.utilities.util import add_parameter, replace_suffix, nifti_splitext, additional_kwargs
  from deepneuro.utilities.visualize import check_data
label_desc: Use image node_id 14 for calling the Output obj's underlying member method code with example usage: obj.save_to_disk(input_data, output_filenames, raw_data) without return types