code: def test_multilinestring(self):
      # From coordinate tuples
      geom = MultiLineString([[(1.0, 2.0), (3.0, 4.0)]])
      assert isinstance(geom, MultiLineString)
      assert len(geom.geoms) == 1
      assert dump_coords(geom) == [[(1.0, 2.0), (3.0, 4.0)]]
  
      # From lines
      a = LineString([(1.0, 2.0), (3.0, 4.0)])
      ml = MultiLineString([a])
      assert len(ml.geoms) == 1
      assert dump_coords(ml) == [[(1.0, 2.0), (3.0, 4.0)]]
  
      # From another multi-line
      ml2 = MultiLineString(ml)
      assert len(ml2.geoms) == 1
      assert dump_coords(ml2) == [[(1.0, 2.0), (3.0, 4.0)]]
  
      # Sub-geometry Access
      geom = MultiLineString([(((0.0, 0.0), (1.0, 2.0)))])
      assert isinstance(geom.geoms[0], LineString)
      assert dump_coords(geom.geoms[0]) == [(0.0, 0.0), (1.0, 2.0)]
      with pytest.raises(IndexError):  # index out of range
          geom.geoms[1]
  
      # Geo interface
      assert geom.__geo_interface__ == {
          "type": "MultiLineString",
          "coordinates": (((0.0, 0.0), (1.0, 2.0)),),
      }
  
file_path: shapely/shapely/tests/geometry/test_multilinestring.py
imports: import numpy
  import pytest
  from shapely import LineString, MultiLineString
  from shapely.errors import EmptyPartError
  from shapely.geometry.base import dump_coords
  from shapely.tests.geometry.test_multi import MultiGeometryTestCase
label_desc: Use image node_id 1 for calling the TestMultiLineString obj's underlying member method code with example usage: obj.test_multilinestring() without return types