code: def test_split_multipolygon_with_line(self):
      # two polygons with a crossing line --> return 4 triangles
      poly1 = Polygon([(0, 0), (1, 0), (1, 1), (0, 1), (0, 0)])
      poly2 = Polygon([(1, 1), (1, 2), (2, 2), (2, 1), (1, 1)])
      mpoly = MultiPolygon([poly1, poly2])
      ls = LineString([(-1, -1), (3, 3)])
      self.helper(mpoly, ls, 4)
  
      # two polygons away from the crossing line --> return identity
      poly1 = Polygon(
          [(10, 10), (10, 11), (11, 11), (11, 10), (10, 10)]
      )
      poly2 = Polygon(
          [(-10, -10), (-10, -11), (-11, -11), (-11, -10), (-10, -10)]
      )
      mpoly = MultiPolygon([poly1, poly2])
      ls = LineString([(-1, -1), (3, 3)])
      self.helper(mpoly, ls, 2)
  
imports: import unittest
  import pytest
  from shapely.errors import GeometryTypeError
  from shapely.geometry import LineString, MultiLineString, MultiPoint, MultiPolygon, Point, Polygon
  from shapely.ops import linemerge, split, unary_union
label_desc: Use image node_id 3 for calling the TestSplitMulti obj's underlying member method code with example usage: obj.test_split_multipolygon_with_line() without return types