code: def test_NeighborCountImage():
      """Test production of a neighbor-count image"""
      labels = numpy.zeros((10, 10), int)
      labels[2, 2] = 1  # x=3,y=4,5 triangle
      labels[2, 5] = 2
      labels[6, 2] = 3
      workspace, module = make_workspace(
          labels,
          cellprofiler.modules.measureobjectneighbors.D_WITHIN,
          4,
      )
      module.wants_count_image.value = True
      module.count_image_name.value = "my_image"
      module.count_colormap.value = "jet"
      module.run(workspace)
      image = workspace.image_set.get_image("my_image").pixel_data
      assert tuple(image.shape) == (10, 10, 3)
      # Everything off of the images should be black
      assert numpy.all(image[labels[labels == 0], :] == 0)
      # The corners should match 1 neighbor and should get the same color
      assert numpy.all(image[2, 5, :] == image[6, 2, :])
      # The pixel at the right angle should have a different color
      assert not numpy.all(image[2, 2, :] == image[2, 5, :])
  
imports: import numpy
  import six.moves
  import cellprofiler_core.image
  import cellprofiler_core.measurement
  from cellprofiler_core.constants.measurement import COLTYPE_INTEGER, COLTYPE_FLOAT, NEIGHBORS, R_FIRST_OBJECT_NUMBER, R_SECOND_OBJECT_NUMBER
  from cellprofiler_core.measurement import RelationshipKey
  import cellprofiler.modules.measureobjectneighbors
  import cellprofiler_core.object
  import cellprofiler_core.pipeline
  import cellprofiler_core.workspace
  import tests.frontend.modules
label_desc: Use image node_id 13 for calling a global function with example usage: test_NeighborCountImage() without return types