docstr: Make sure we can handle labels matrices that are all zero
docstr_tok: ["Make","sure","we","can","handle","labels","matrices","that","are","all","zero"]
code: def test_04_00_distance_empty(self):
      """Make sure we can handle labels matrices that are all zero"""
      empty_labels = numpy.zeros((10, 20), int)
      some_labels = numpy.zeros((10, 20), int)
      some_labels[2:7, 3:8] = 1
      some_labels[3:8, 12:17] = 2
      for parent_labels, child_labels, n in (
          (empty_labels, empty_labels, 0),
          (some_labels, empty_labels, 0),
          (empty_labels, some_labels, 2),
      ):
          workspace, module = self.make_workspace(
              parent_labels, child_labels
          )
          self.assertTrue(
              isinstance(
                  module, cellprofiler.modules.relateobjects.Relate
              )
          )
          module.find_parent_child_distances.value = (
              cellprofiler.modules.relateobjects.D_BOTH
          )
          module.run(workspace)
          self.features_and_columns_match(workspace)
          meas = workspace.measurements
          for feature in (
              cellprofiler.modules.relateobjects.FF_CENTROID,
              cellprofiler.modules.relateobjects.FF_MINIMUM,
          ):
              m = feature % PARENT_OBJECTS
              v = meas.get_current_measurement(CHILD_OBJECTS, m)
              self.assertEqual(len(v), n)
              if n > 0:
                  self.assertTrue(numpy.all(numpy.isnan(v)))
  
imports: import numpy
  import unittest
  import cellprofiler_core.image
  import cellprofiler_core.measurement
  import cellprofiler_core.module
  from cellprofiler_core.constants.measurement import C_PARENT, GROUP_NUMBER, GROUP_INDEX, COLTYPE_FLOAT, COLTYPE_INTEGER, M_LOCATION_CENTER_X, M_LOCATION_CENTER_Y, FF_PARENT
  import cellprofiler.modules.relateobjects
  import cellprofiler_core.object
  import cellprofiler_core.pipeline
  import cellprofiler_core.preferences
  import cellprofiler_core.workspace
label_desc: Use image node_id 9 for calling the TestRelateObjects obj's underlying member method code with example usage: obj.test_04_00_distance_empty() without return types