code: def test_mask_crop_3d(
      basic_image_2x2, basic_image_file, basic_geometry_3d
  ):
      """Output should be cropped to extent of geometry, 3D geom okay."""
      geometries = [basic_geometry_3d]
      with rasterio.open(basic_image_file) as src:
          masked, transform = mask(src, geometries, crop=True)
  
      assert masked.shape == (1, 3, 3)
      assert np.array_equal(masked[0], basic_image_2x2[2:5, 2:5])
  
imports: import numpy
  import pytest
  from affine import Affine
  import rasterio
  from rasterio.mask import raster_geometry_mask, mask
  from .conftest import MockGeoInterface
label_desc: Use image node_id 17 for calling a global function with example usage: test_mask_crop_3d(basic_image_2x2, basic_image_file, basic_geometry_3d) without return types