code: def generate_output_filename(
      self, filename, suffix=None, file_extension=".nii.gz"
  ):
      if suffix is None:
          suffix = self.preprocessor_string
  
      filename = os.path.abspath(filename)
  
      # A bit hacky
      if self.name == "Conversion" and (
          filename.endswith(".nii") or filename.endswith(".nii.gz")
      ):
          output_filename = filename
      elif self.output_folder is None:
          if os.path.isdir(filename):
              output_filename = os.path.join(
                  filename,
                  os.path.basename(
                      os.path.dirname(filename)
                      + suffix
                      + file_extension
                  ),
              )
          else:
              output_filename = replace_suffix(filename, "", suffix)
      else:
          if os.path.isdir(filename):
              output_filename = os.path.join(
                  self.output_folder,
                  os.path.basename(filename + suffix + file_extension),
              )
          else:
              output_filename = os.path.join(
                  self.output_folder,
                  os.path.basename(
                      replace_suffix(
                          filename,
                          "",
                          suffix,
                          file_extension=file_extension,
                      )
                  ),
              )
  
      return cli_sanitize(output_filename)
  
imports: import os
  import numpy
  from deepneuro.utilities.util import add_parameter, replace_suffix, cli_sanitize, docker_print
  from deepneuro.utilities.conversion import read_image_files, save_data
label_desc: Use image node_id 8 for calling the Preprocessor obj's underlying member method code with example usage: obj.generate_output_filename(filename, suffix, file_extension) and returns: cli_sanitize