code: def test_canny():
      """Test the canny method"""
      i, j = numpy.mgrid[-20:20, -20:20]
      image = numpy.logical_and(i > j, i**2 + j**2 < 300).astype(
          numpy.float32
      )
      numpy.random.seed(0)
      image = image * 0.5 + numpy.random.uniform(size=image.shape) * 0.3
      image = numpy.ascontiguousarray(image, numpy.float32)
      workspace, module = make_workspace(image)
      module.method.value = cellprofiler.modules.enhanceedges.M_CANNY
      module.wants_automatic_threshold.value = True
      module.wants_automatic_low_threshold.value = True
      module.wants_automatic_sigma.value = True
      module.run(workspace)
      output = workspace.image_set.get_image(OUTPUT_IMAGE_NAME)
      t1, t2 = centrosome.otsu.otsu3(centrosome.filter.sobel(image))
      result = centrosome.filter.canny(
          image, numpy.ones(image.shape, bool), 1.0, t1, t2
      )
      assert numpy.all(output.pixel_data == result)
  
imports: import centrosome.filter
  import centrosome.kirsch
  import centrosome.otsu
  import numpy
  import cellprofiler_core.image
  import cellprofiler_core.measurement
  import cellprofiler.modules.enhanceedges
  import cellprofiler_core.object
  import cellprofiler_core.pipeline
  import cellprofiler_core.workspace
label_desc: Use image node_id 11 for calling a global function with example usage: test_canny() without return types