code: def test_cropping(self):
      x = cellprofiler_core.image.Image()
      x.image = numpy.ones((7, 7))
      crop_mask = numpy.zeros((10, 10), bool)
      crop_mask[2:-1, 1:-2] = True
      x.crop_mask = crop_mask
      i, j = numpy.mgrid[0:10, 0:10]
      test = i + j * 10
      test_out = x.crop_image_similarly(test)
      assert numpy.all(test_out == test[2:-1, 1:-2])
  
imports: import math
  import numpy
  import cellprofiler_core.image
label_desc: Use image node_id 8 for calling the TestImage obj's underlying member method code with example usage: obj.test_cropping() without return types