code: def _assert_nan_coords_same(x, y, tolerance, err_msg, verbose):
      x, y = np.broadcast_arrays(x, y)
      x_coords = shapely.get_coordinates(x, include_z=True)
      y_coords = shapely.get_coordinates(y, include_z=True)
  
      # Check the shapes (condition is copied from numpy test_array_equal)
      if x_coords.shape != y_coords.shape:
          return False
  
      # Check NaN positional equality
      x_id = np.isnan(x_coords)
      y_id = np.isnan(y_coords)
      if not (x_id == y_id).all():
          msg = build_err_msg(
              [x, y],
              err_msg + "\nx and y nan coordinate location mismatch:",
              verbose=verbose,
          )
          raise AssertionError(msg)
  
      # If this passed, replace NaN with a number to be able to use equals_exact
      x_no_nan = shapely.transform(x, _replace_nan, include_z=True)
      y_no_nan = shapely.transform(y, _replace_nan, include_z=True)
  
      return _equals_exact_with_ndim(
          x_no_nan, y_no_nan, tolerance=tolerance
      )
  
file_path: shapely/shapely/testing.py
imports: from functools import partial
  import numpy
  import shapely
label_desc: Use image node_id 3 for calling a global function with example usage: _assert_nan_coords_same(x, y, tolerance, err_msg, verbose) and returns: _equals_exact_with_ndim, False