docstr: Compute the mean for two parents and four children
docstr_tok: ["Compute","the","mean","for","two","parents","and","four","children"]
code: def test_03_01_mean(self):
      """Compute the mean for two parents and four children"""
      i, j = numpy.mgrid[0:20, 0:20]
      parent_labels = (i / 10 + 1).astype(int)
      child_labels = (i / 10).astype(int) + (j / 10).astype(int) * 2 + 1
      workspace, module = self.make_workspace(
          parent_labels, child_labels, fake_measurement=True
      )
      module.wants_per_parent_means.value = True
      m = workspace.measurements
      self.assertTrue(
          isinstance(m, cellprofiler_core.measurement.Measurements)
      )
      m.add_measurement(
          CHILD_OBJECTS, MEASUREMENT, numpy.array([1.0, 2.0, 3.0, 4.0])
      )
      m.add_measurement(
          CHILD_OBJECTS, IGNORED_MEASUREMENT, numpy.array([1, 2, 3, 4])
      )
      expected = numpy.array([2.0, 3.0])
      module.run(workspace)
      name = "Mean_%s_%s" % (CHILD_OBJECTS, MEASUREMENT)
      self.assertTrue(name in m.get_feature_names(PARENT_OBJECTS))
      data = m.get_current_measurement(PARENT_OBJECTS, name)
      self.assertTrue(numpy.all(data == expected))
      self.features_and_columns_match(workspace)
      name = "Mean_%s_%s" % (CHILD_OBJECTS, IGNORED_MEASUREMENT)
      self.assertFalse(name in m.get_feature_names(PARENT_OBJECTS))
  
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 7 for calling the TestRelateObjects obj's underlying member method code with example usage: obj.test_03_01_mean() without return types