code: def assert_coordinate_consistent(obj, coords):
      
      for k in obj.dims:
          # make sure there are no conflict in dimension coordinates
          if k in coords and k in obj.coords:
              if not coords[k].equals(obj[k].variable):
                  raise IndexError(
                      'dimension coordinate {!r} conflicts between '
                      'indexed and indexing objects:\n{}\nvs.\n{}'
                      .format(k, obj[k], coords[k]))
docs: Maeke sure the dimension coordinate of obj is
      consistent with coords.
  
      obj: DataArray or Dataset
      coords: Dict-like of variables