code: def test_PercentTouchingImage():
      """Test production of a percent touching image"""
      labels = numpy.zeros((10, 10), int)
      labels[2, 2] = 1
      labels[2, 5] = 2
      labels[6, 2] = 3
      labels[7, 2] = 3
      workspace, module = make_workspace(
          labels,
          cellprofiler.modules.measureobjectneighbors.D_WITHIN,
          4,
      )
      module.wants_percent_touching_image.value = True
      module.touching_image_name.value = "my_image"
      module.touching_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)
      # 1 and 2 are at 100 %
      assert numpy.all(image[2, 2, :] == image[2, 5, :])
      # 3 is at 50% and should have a different color
      assert not numpy.all(image[2, 2, :] == image[6, 2, :])
  
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 14 for calling a global function with example usage: test_PercentTouchingImage() without return types