code: def test_linearrings_error_nan():
      with pytest.raises(ValueError, match=".*NaN.*"):
          shapely.linearrings(
              [[1, 1], [2, 1], [2, 2], [2, float("nan")], [1, 1]],
              indices=[0, 0, 0, 0, 0],
              handle_nan="error",
          )
  
imports: import numpy
  import pytest
  from numpy.testing import assert_array_equal
  import shapely
  from shapely import LinearRing, Polygon
  from shapely.testing import assert_geometries_equal
  from shapely.tests.common import empty_point, line_string, linear_ring, point, polygon
label_desc: Use image node_id 26 for calling a global function with example usage: test_linearrings_error_nan() without return types