docstr: Create a file (or files if there's metadata) based on the object names
  
  object_names - a sequence of object names (or Image or Experiment)
                 which tell us which objects get piled into each file
  workspace - get the images from here.
  settings_group - if present, use the settings group for naming.
docstr_tok: ["Create","a","file","(","or","files","if","there","'s","metadata",")","based","on","the","object","names","object_names","-","a","sequence","of","object","names","(","or","Image","or","Experiment",")","which","tell","us","which","objects","get","piled","into","each","file","workspace","-","get","the","images","from","here",".","settings_group","-","if","present",",","use","the","settings","group","for","naming","."]
code: def run_objects(self, object_names, workspace, settings_group=None):
      """Create a file (or files if there's metadata) based on the object names
  
      object_names - a sequence of object names (or Image or Experiment)
                     which tell us which objects get piled into each file
      workspace - get the images from here.
      settings_group - if present, use the settings group for naming.
  
      """
      if len(object_names) == 1 and object_names[0] == EXPERIMENT:
          self.make_experiment_file(workspace, settings_group)
          return
      metadata_groups = self.get_metadata_groups(
          workspace, settings_group
      )
      for metadata_group in metadata_groups:
          if len(object_names) == 1 and object_names[0] == IMAGE:
              self.make_image_file(
                  metadata_group.image_numbers,
                  workspace,
                  settings_group,
              )
              if self.wants_genepattern_file.value:
                  self.make_gct_file(
                      metadata_group.image_numbers,
                      workspace,
                      settings_group,
                  )
          elif (
              len(object_names) == 1
              and object_names[0] == OBJECT_RELATIONSHIPS
          ):
              self.make_relationships_file(
                  metadata_group.image_numbers,
                  workspace,
                  settings_group,
              )
          else:
              self.make_object_file(
                  object_names,
                  metadata_group.image_numbers,
                  workspace,
                  settings_group,
              )
  
imports: import base64
  import csv
  import logging
  import os
  import numpy
  from cellprofiler_core.constants.image import C_MD5_DIGEST, C_SCALING, C_HEIGHT, C_WIDTH
  from cellprofiler_core.constants.measurement import EXPERIMENT, IMAGE, AGG_MEAN, AGG_MEDIAN, AGG_STD_DEV, C_URL, C_PATH_NAME, C_FILE_NAME, NEIGHBORS, R_FIRST_IMAGE_NUMBER, R_SECOND_IMAGE_NUMBER, R_FIRST_OBJECT_NUMBER, R_SECOND_OBJECT_NUMBER
  from cellprofiler_core.constants.module import IO_FOLDER_CHOICE_HELP_TEXT, IO_WITH_METADATA_HELP_TEXT, USING_METADATA_HELP_REF, USING_METADATA_TAGS_REF
  from cellprofiler_core.constants.pipeline import EXIT_STATUS
  from cellprofiler_core.measurement import Measurements
  from cellprofiler_core.module import Module
  from cellprofiler_core.preferences import ABSOLUTE_FOLDER_NAME
  from cellprofiler_core.preferences import DEFAULT_INPUT_FOLDER_NAME
  from cellprofiler_core.preferences import DEFAULT_INPUT_SUBFOLDER_NAME
  from cellprofiler_core.preferences import DEFAULT_OUTPUT_FOLDER_NAME
  from cellprofiler_core.preferences import DEFAULT_OUTPUT_SUBFOLDER_NAME
  from cellprofiler_core.preferences import get_headless
  from cellprofiler_core.setting import Binary
  from cellprofiler_core.setting import Divider
  from cellprofiler_core.setting import Measurement
  from cellprofiler_core.setting import SettingsGroup
  from cellprofiler_core.setting import ValidationError
  from cellprofiler_core.setting.choice import CustomChoice, Choice
  from cellprofiler_core.setting.do_something import DoSomething, RemoveSettingButton
  from cellprofiler_core.setting.multichoice import MeasurementMultiChoice
  from cellprofiler_core.setting.subscriber import ImageSubscriber, LabelSubscriber
  from cellprofiler_core.setting.text import Directory, Text
  from cellprofiler_core.utilities.core.modules.load_data import is_file_name_feature, is_path_name_feature
  from cellprofiler_core.utilities.measurement import find_metadata_tokens, get_agg_measurement_name
  from cellprofiler.gui.help.content import MEASUREMENT_NAMING_HELP
label_desc: Use image node_id 17 for calling the ExportToSpreadsheet obj's underlying member method code with example usage: obj.run_objects(object_names, workspace, settings_group) without return types