code: def test_center_outside_of_object():
      """Make sure MeasureObjectIntensityDistribution can handle oddly shaped objects"""
      numpy.random.seed(42)
      labels = numpy.array(
          [
              [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
              [0, 1, 1, 1, 1, 1, 1, 1, 1, 0],
              [0, 1, 0, 0, 0, 0, 0, 0, 1, 0],
              [0, 1, 0, 0, 0, 0, 0, 0, 1, 0],
              [0, 1, 0, 0, 0, 0, 0, 0, 1, 0],
              [0, 1, 0, 0, 0, 0, 0, 0, 1, 0],
              [0, 1, 0, 0, 0, 0, 0, 0, 1, 0],
              [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
          ]
      )
  
      center_labels = numpy.zeros(labels.shape, int)
      center_labels[
          int(center_labels.shape[0] / 2),
          int(center_labels.shape[1] / 2),
      ] = 1
  
      image = numpy.random.uniform(size=labels.shape)
      for center_choice in (
          cellprofiler.modules.measureobjectintensitydistribution.C_CENTERS_OF_OTHER,
          cellprofiler.modules.measureobjectintensitydistribution.C_EDGES_OF_OTHER,
      ):
          m = run_module(
              image,
              labels,
              center_labels=center_labels,
              center_choice=center_choice,
              bin_count=4,
          )
          for bin in range(1, 5):
              data = m.get_current_measurement(
                  OBJECT_NAME, feature_frac_at_d(bin, 4)
              )
              assert len(data) == 1
  
      m = run_module(image, labels, bin_count=4)
      for bin in range(1, 5):
          data = m.get_current_measurement(
              OBJECT_NAME, feature_frac_at_d(bin, 4)
          )
          assert len(data) == 1
  
imports: import io
  import centrosome.propagate
  import numpy
  import scipy.stats
  import cellprofiler_core.image
  import cellprofiler_core.measurement
  import cellprofiler_core.module
  from cellprofiler_core.constants.measurement import COLTYPE_FLOAT
  import cellprofiler.modules.measureobjectintensitydistribution
  import cellprofiler_core.object
  import cellprofiler_core.pipeline
  import cellprofiler_core.preferences
  import cellprofiler_core.setting
  import cellprofiler_core.workspace
  import tests.frontend.modules
label_desc: Use image node_id 24 for calling a global function with example usage: test_center_outside_of_object() without return types