code: def test_threshold_no_smoothing():
      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, 1, 1, 1, 0, 0],
              [0, 0, 1, 1, 1, 0, 0],
              [0, 0, 1, 1, 1, 0, 0],
              [0, 0, 0, 0, 0, 0, 0],
              [0, 0, 0, 0, 0, 0, 0],
          ]
      )
      for tm in (
          TS_MANUAL,
          TS_MEASUREMENT,
      ):
          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
          )
          module.threshold.threshold_scope.value = (
              cellprofiler.modules.threshold.TS_GLOBAL
          )
          module.threshold.global_operation.value = tm
          module.threshold.manual_threshold.value = 0.125
          module.threshold.thresholding_measurement.value = (
              MEASUREMENT_NAME
          )
          workspace.measurements["Image", MEASUREMENT_NAME] = 0.125
          module.threshold.threshold_smoothing_scale.value = 0
          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 39 for calling a global function with example usage: test_threshold_no_smoothing() without return types