code: def test_image_volume():
      pixel_data = numpy.zeros((5, 10, 10), dtype=bool)
      pixel_data[:2, :2, :2] = True
      pixel_data[3:, 8:, 8:] = True
  
      image = cellprofiler_core.image.Image(pixel_data, dimensions=3)
  
      expected_area = [16]
      expected_perimeter = [16]
      expected_total_area = 500
  
      workspace = make_workspace(
          numpy.zeros_like(pixel_data), parent_image=image
      )
      workspace.pipeline.set_volumetric(True)
      workspace.image_set.add("MyBinaryImage", image)
  
      module = workspace.module
      module.operand_choice.value = "Binary Image"
      module.images_list.value = "MyBinaryImage"
  
      module.run(workspace)
  
      def mn(x):
          return "AreaOccupied_%s_%s" % (x, module.images_list.value[0])
  
      numpy.testing.assert_array_equal(
          workspace.measurements.get_current_measurement(
              "Image", mn("VolumeOccupied")
          ),
          expected_area,
      )
  
      numpy.testing.assert_array_almost_equal(
          workspace.measurements.get_current_measurement(
              "Image", mn("SurfaceArea")
          ),
          expected_perimeter,
          decimal=0,
      )
  
      numpy.testing.assert_array_equal(
          workspace.measurements.get_current_measurement(
              "Image", mn("TotalVolume")
          ),
          expected_total_area,
      )
  
file_path: CellProfiler/tests/frontend/modules/test_measureimageareaoccupied.py
imports: import numpy
  import six
  import cellprofiler_core.image
  import cellprofiler_core.measurement
  from cellprofiler_core.constants.measurement import COLTYPE_FLOAT
  import cellprofiler.modules.measureimageareaoccupied
  import cellprofiler_core.object
  import cellprofiler_core.pipeline
  import cellprofiler_core.preferences
  import cellprofiler_core.workspace
  import tests.frontend.modules
label_desc: Use image node_id 7 for calling a global function with example usage: test_image_volume() and returns: unknown