code: def test_multipolygon(self):
      # Empty
      self.assertSVG(MultiPolygon(), "<g />")
      # Valid
      self.assertSVG(
          MultiPolygon(
              [
                  Polygon([(40, 40), (20, 45), (45, 30), (40, 40)]),
                  Polygon(
                      [
                          (20, 35),
                          (10, 30),
                          (10, 10),
                          (30, 5),
                          (45, 20),
                          (20, 35),
                      ],
                      [[(30, 20), (20, 15), (20, 25), (30, 20)]],
                  ),
              ]
          ),
          '<g><path fill-rule="evenodd" fill="#66cc99" stroke="#555555" '
          'stroke-width="2.0" opacity="0.6" d="M 40.0,40.0 L 20.0,45.0 L '
          '45.0,30.0 L 40.0,40.0 z" />'
          '<path fill-rule="evenodd" fill="#66cc99" stroke="#555555" '
          'stroke-width="2.0" opacity="0.6" d="M 20.0,35.0 L 10.0,30.0 L '
          "10.0,10.0 L 30.0,5.0 L 45.0,20.0 L 20.0,35.0 z M 30.0,20.0 L "
          '20.0,15.0 L 20.0,25.0 L 30.0,20.0 z" /></g>',
      )
      # Invalid
      self.assertSVG(
          MultiPolygon(
              [
                  Polygon(
                      [(140, 140), (120, 145), (145, 130), (140, 140)]
                  ),
                  Polygon(
                      [(0, 40), (0, 0), (40, 40), (40, 0), (0, 40)]
                  ),
              ]
          ),
          '<g><path fill-rule="evenodd" fill="#ff3333" stroke="#555555" '
          'stroke-width="2.0" opacity="0.6" d="M 140.0,140.0 L '
          '120.0,145.0 L 145.0,130.0 L 140.0,140.0 z" />'
          '<path fill-rule="evenodd" fill="#ff3333" stroke="#555555" '
          'stroke-width="2.0" opacity="0.6" d="M 0.0,40.0 L 0.0,0.0 L '
          '40.0,40.0 L 40.0,0.0 L 0.0,40.0 z" /></g>',
      )
  
file_path: shapely/shapely/tests/legacy/test_svg.py
imports: import os
  import unittest
  from xml.dom.minidom import parseString
  from shapely.geometry import LineString, MultiLineString, MultiPoint, MultiPolygon, Point, Polygon
  from shapely.geometry.collection import GeometryCollection
label_desc: Use image node_id 7 for calling the SvgTestCase obj's underlying member method code with example usage: obj.test_multipolygon() without return types