code: def test_collection(self):
      # Empty
      self.assertSVG(GeometryCollection(), "<g />")
      # Valid
      self.assertSVG(
          GeometryCollection(
              [Point(7, 3), LineString([(4, 2), (8, 4)])]
          ),
          '<g><circle cx="7.0" cy="3.0" r="3.0" stroke="#555555" '
          'stroke-width="1.0" fill="#66cc99" opacity="0.6" />'
          '<polyline fill="none" stroke="#66cc99" stroke-width="2.0" '
          'points="4.0,2.0 8.0,4.0" opacity="0.8" /></g>',
      )
      # Invalid
      self.assertSVG(
          Point(7, 3).union(LineString([(4, 2), (4, 2)])),
          '<g><circle cx="7.0" cy="3.0" r="3.0" stroke="#555555" '
          'stroke-width="1.0" fill="#ff3333" opacity="0.6" />'
          '<polyline fill="none" stroke="#ff3333" stroke-width="2.0" '
          'points="4.0,2.0 4.0,2.0" opacity="0.8" /></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 8 for calling the SvgTestCase obj's underlying member method code with example usage: obj.test_collection() without return types