code: def test_linearring_from_invalid():
      coords = [(0.0, 0.0), (0.0, 0.0), (0.0, 0.0)]
      line = LineString(coords)
      assert not line.is_valid
      with pytest.raises(TopologicalError):
          LinearRing(line)
  
imports: import numpy
  import pytest
  from shapely import LinearRing, LineString, Point, Polygon
  from shapely.coords import CoordinateSequence
  from shapely.errors import TopologicalError
  from shapely.wkb import loads
label_desc: Use image node_id 6 for calling a global function with example usage: test_linearring_from_invalid() without return types