code: def make_classifier(
      module,
      answers,
      classes=None,
      class_names=None,
      rules_class=None,
      name="Classifier",
      feature_names=[f"{OBJECTS_NAME}_{TEST_FTR}"],
  ):
      """Returns the filename of the classifier pickle"""
      assert isinstance(
          module, cellprofiler.modules.classifyobjects.ClassifyObjects
      )
      if classes is None:
          if class_names != None:
              classes = numpy.arange(1, len(class_names) + 1)
          else:
              classes = numpy.arange(1, numpy.max(answers) + 1)
      if class_names is None:
          class_names = [str(_) for _ in classes]
      if rules_class is None:
          rules_class = class_names[0]
      s = make_classifier_pickle(
          answers, classes, class_names, name, feature_names
      )
      fd, filename = tempfile.mkstemp(".model")
      os.write(fd, s)
      os.close(fd)
  
      module.contrast_choice.value = (
          cellprofiler.modules.classifyobjects.BY_MODEL
      )
      module.model_directory.set_custom_path(os.path.dirname(filename))
      module.model_file_name.value = os.path.split(filename)[1]
      yield
      try:
          os.remove(filename)
      except:
          pass
  
imports: import contextlib
  import os
  import pickle
  import tempfile
  import numpy
  import pytest
  import cellprofiler_core.image
  import cellprofiler_core.measurement
  from cellprofiler_core.constants.measurement import COLTYPE_FLOAT, COLTYPE_INTEGER
  import cellprofiler.modules.classifyobjects
  import cellprofiler_core.object
  import cellprofiler_core.pipeline
  import cellprofiler_core.setting
  import cellprofiler_core.workspace
label_desc: Use image node_id 3 for calling a global function with example usage: make_classifier(module, answers, classes, class_names, rules_class, name, feature_names) without return types