code: def test_threshold_smoothing_automatic():
      image = numpy.array(
          [
              [0, 0, 0, 0, 0, 0, 0],
              [0, 0, 0, 0, 0, 0, 0],
              [0, 0, 0.4, 0.4, 0.4, 0, 0],
              [0, 0, 0.4, 0.5, 0.4, 0, 0],
              [0, 0, 0.4, 0.4, 0.4, 0, 0],
              [0, 0, 0, 0, 0, 0, 0],
              [0, 0, 0, 0, 0, 0, 0],
          ]
      )
      expected = numpy.array(
          [
              [0, 0, 0, 0, 0, 0, 0],
              [0, 0, 0, 0, 0, 0, 0],
              [0, 0, 0, 1, 0, 0, 0],
              [0, 0, 1, 1, 1, 0, 0],
              [0, 0, 0, 1, 0, 0, 0],
              [0, 0, 0, 0, 0, 0, 0],
              [0, 0, 0, 0, 0, 0, 0],
          ]
      )
      workspace, module = make_workspace(image)
      assert isinstance(
          module,
          cellprofiler.modules.identifyprimaryobjects.IdentifyPrimaryObjects,
      )
      module.use_advanced.value = True
      module.exclude_size.value = False
      module.unclump_method.value = (
          cellprofiler.modules.identifyprimaryobjects.UN_NONE
      )
      module.watershed_method.value = (
          cellprofiler.modules.identifyprimaryobjects.WA_NONE
      )
      # MCT on this image is zero, so set the threshold at .225
      # with the threshold minimum (manual = no smoothing)
      module.threshold.threshold_scope.value = TS_GLOBAL
      module.threshold.global_operation.value = (
          cellprofiler.modules.threshold.TM_LI
      )
      module.threshold.threshold_range.min = 0.225
      module.run(workspace)
      labels = workspace.object_set.get_objects(OBJECTS_NAME).segmented
      numpy.testing.assert_array_equal(expected, labels)
  
imports: import io
  import os
  import centrosome.threshold
  import numpy
  import pytest
  import scipy.ndimage
  import cellprofiler_core.image
  import cellprofiler_core.measurement
  from cellprofiler_core.constants.measurement import FF_COUNT, COLTYPE_INTEGER, FF_FINAL_THRESHOLD, COLTYPE_FLOAT, FF_ORIG_THRESHOLD, M_NUMBER_OBJECT_NUMBER, M_LOCATION_CENTER_X, M_LOCATION_CENTER_Y, M_LOCATION_CENTER_Z, FF_SUM_OF_ENTROPIES, FF_WEIGHTED_VARIANCE
  from cellprofiler_core.constants.module._identify import TS_GLOBAL, TS_ADAPTIVE, O_TWO_CLASS, O_FOREGROUND, O_THREE_CLASS, O_BACKGROUND, RB_MODE, RB_SD, RB_MEAN, RB_MEDIAN, RB_MAD, TS_MANUAL, TS_MEASUREMENT
  from cellprofiler_core.image import VanillaImage
  import cellprofiler.modules.identifyprimaryobjects
  import cellprofiler.modules.threshold
  import cellprofiler_core.object
  import cellprofiler_core.pipeline
  import cellprofiler_core.setting
  import cellprofiler_core.workspace
  import tests.frontend
  import tests.frontend.modules
label_desc: Use image node_id 37 for calling a global function with example usage: test_threshold_smoothing_automatic() without return types