code: def test_equality_with_nan_z_false():
      with ignore_invalid():
          left = LineString([(0, 1, np.nan), (2, 3, np.nan)])
          right = LineString([(0, 1, np.nan), (2, 3, 4)])
  
      if shapely.geos_version < (3, 10, 0):
          # GEOS <= 3.9 fill the NaN with 0, so the z dimension is different
          # assert left != right
          # however, has_z still returns False, so z dimension is ignored in .coords
          assert left == right
      elif shapely.geos_version < (3, 12, 0):
          # GEOS 3.10-3.11 ignore NaN for Z also when explicitly created with 3D
          # and so the geometries are considered as 2D (and thus z dimension is ignored)
          assert left == right
      else:
          assert left != right
  
file_path: shapely/shapely/tests/geometry/test_equality.py
imports: import numpy
  import pytest
  import shapely
  from shapely import LinearRing, LineString, MultiLineString, Point, Polygon
  from shapely.tests.common import all_types, all_types_z, empty_point, ignore_invalid
label_desc: Use image node_id 6 for calling a global function with example usage: test_equality_with_nan_z_false() without return types