code: def test_equality_z():
      # different dimensionality
      geom1 = Point(0, 1)
      geom2 = Point(0, 1, 0)
      assert geom1 != geom2
  
      # different dimensionality with NaN z
      geom2 = Point(0, 1, np.nan)
      if shapely.geos_version < (3, 10, 0):
          # GEOS < 3.8 fill the NaN with 0, so the z dimension is different
          # assert geom1 != geom2
          # however, has_z still returns False, so z dimension is ignored in .coords
          assert geom1 == geom2
      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 geom1 == geom2
      else:
          assert geom1 != geom2
  
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 7 for calling a global function with example usage: test_equality_z() without return types