code: def test_multipolygons():
      arr = shapely.from_wkt(
          [
              "MULTIPOLYGON (((35 10, 45 45, 15 40, 10 20, 35 10), (20 30, 35 35, 30 20, 20 30)))",
              "MULTIPOLYGON (((40 40, 20 45, 45 30, 40 40)),((20 35, 10 30, 10 10, 30 5, 45 20, 20 35),(30 20, 20 15, 20 25, 30 20)))",
              "MULTIPOLYGON EMPTY",
              "MULTIPOLYGON EMPTY",
              "MULTIPOLYGON (((40 40, 20 45, 45 30, 40 40)))",
              "MULTIPOLYGON EMPTY",
          ]
      )
      typ, coords, offsets = shapely.to_ragged_array(arr)
      expected = np.array(
          [
              [35.0, 10.0],
              [45.0, 45.0],
              [15.0, 40.0],
              [10.0, 20.0],
              [35.0, 10.0],
              [20.0, 30.0],
              [35.0, 35.0],
              [30.0, 20.0],
              [20.0, 30.0],
              [40.0, 40.0],
              [20.0, 45.0],
              [45.0, 30.0],
              [40.0, 40.0],
              [20.0, 35.0],
              [10.0, 30.0],
              [10.0, 10.0],
              [30.0, 5.0],
              [45.0, 20.0],
              [20.0, 35.0],
              [30.0, 20.0],
              [20.0, 15.0],
              [20.0, 25.0],
              [30.0, 20.0],
              [40.0, 40.0],
              [20.0, 45.0],
              [45.0, 30.0],
              [40.0, 40.0],
          ]
      )
      expected_offsets1 = np.array([0, 5, 9, 13, 19, 23, 27])
      expected_offsets2 = np.array([0, 2, 3, 5, 6])
      expected_offsets3 = np.array([0, 1, 3, 3, 3, 4, 4])
  
      assert typ == shapely.GeometryType.MULTIPOLYGON
      assert_allclose(coords, expected)
      assert len(offsets) == 3
      assert_allclose(offsets[0], expected_offsets1)
      assert_allclose(offsets[1], expected_offsets2)
      assert_allclose(offsets[2], expected_offsets3)
  
      result = shapely.from_ragged_array(typ, coords, offsets)
      assert_geometries_equal(result, arr)
  
imports: import numpy
  import pytest
  from numpy.testing import assert_allclose
  import shapely
  from shapely import MultiLineString, MultiPoint, MultiPolygon
  from shapely.testing import assert_geometries_equal
  from shapely.tests.common import empty_line_string, empty_line_string_z, geometry_collection, line_string, line_string_z, linear_ring, multi_line_string, multi_line_string_z, multi_point, multi_point_z, multi_polygon, multi_polygon_z, point, point_z, polygon, polygon_z
label_desc: Use image node_id 12 for calling a global function with example usage: test_multipolygons() without return types