code: def test_run_binary(workspace, module):
      module.object_name.value = "inputobjects"
  
      module.image_name.value = "outputimage"
  
      module.image_mode.value = "Binary (black & white)"
  
      module.run(workspace)
  
      image = workspace.image_set.get_image("outputimage")
  
      objects = workspace.get_objects("inputobjects")
  
      assert image.dimensions == objects.segmented.ndim
  
      pixel_data = image.pixel_data
  
      assert pixel_data.shape == objects.shape
  
      if objects.segmented.ndim == 2:
          assert not pixel_data[0, 0]
  
          assert numpy.all(pixel_data[:, 1:])
  
          assert numpy.all(pixel_data[1:, :])
      else:
          assert not numpy.all(pixel_data[:, 0, 0])
  
          assert numpy.all(pixel_data[:, :, 1:])
  
          assert numpy.all(pixel_data[:, 1:, :])
  
imports: import numpy
  import pytest
  import scipy.sparse.coo
  import cellprofiler_core.image
  import cellprofiler_core.measurement
  import cellprofiler_core.module
  import cellprofiler.modules.convertobjectstoimage
  import cellprofiler_core.object
  import cellprofiler_core.pipeline
  import cellprofiler_core.preferences
  import cellprofiler_core.workspace
label_desc: Use image node_id 6 for calling a global function with example usage: test_run_binary(workspace, module) without return types