code: def test_01_02_sparse(self):
      r = numpy.random.RandomState()
      r.seed(102)
      ijv = numpy.core.records.fromarrays(
          [r.randint(0, 10, size=20) for _ in range(3)],
          [
              (
                  cellprofiler_core.utilities.hdf5_dict.HDF5ObjectSet.AXIS_Y,
                  numpy.uint32,
                  1,
              ),
              (
                  cellprofiler_core.utilities.hdf5_dict.HDF5ObjectSet.AXIS_X,
                  numpy.uint32,
                  1,
              ),
              (
                  cellprofiler_core.utilities.hdf5_dict.HDF5ObjectSet.AXIS_LABELS,
                  numpy.uint32,
                  1,
              ),
          ],
      )
      s = cellprofiler_core.object.Segmentation(sparse=ijv)
      numpy.testing.assert_array_equal(s.sparse, ijv)
      assert not s.has_dense()
      assert s.has_sparse()
  
file_path: CellProfiler/tests/core/object/test_segmentation.py
imports: import numpy
  import numpy.testing
  import cellprofiler_core.image
  import cellprofiler_core.object
  import cellprofiler_core.utilities.hdf5_dict
label_desc: Use image node_id 2 for calling the TestSegmentation obj's underlying member method code with example usage: obj.test_01_02_sparse() without return types