code: def assert_index_equal(
      left: Union[ps.Index, pd.Index],
      right: Union[ps.Index, pd.Index],
      exact: Union[bool, Literal["equiv"]] = "equiv",
      check_names: bool = True,
      check_exact: bool = True,
      check_categorical: bool = True,
      check_order: bool = True,
      rtol: float = 1.0e-5,
      atol: float = 1.0e-8,
      obj: str = "Index",
  ) -> None:
      """
      Check that left and right Index are equal.
  
      .. versionadded:: 4.0.0
  
      Parameters
      ----------
      left : Index
      right : Index
      exact : bool or {'equiv'}, default 'equiv'
          Whether to check the Index class, dtype and inferred_type
          are identical. If 'equiv', then RangeIndex can be substituted for
          Index with an int64 dtype as well.
      check_names : bool, default True
          Whether to check the names attribute.
      check_exact : bool, default True
          Whether to compare number exactly.
      check_categorical : bool, default True
          Whether to compare internal Categorical exactly.
      check_order : bool, default True
          Whether to compare the order of index entries as well as their values.
          If True, both indexes must contain the same elements, in the same order.
          If False, both indexes must contain the same elements, but in any order.
      rtol : float, default 1e-5
          Relative tolerance. Only used when check_exact is False.
      atol : float, default 1e-8
          Absolute tolerance. Only used when check_exact is False.
      obj : str, default 'Index'
          Specify object name being compared, internally used to show appropriate
          assertion message.
  
      Examples
      --------
      >>> from pyspark.pandas import testing as tm
      >>> a = ps.Index([1, 2, 3])
      >>> b = ps.Index([1, 2, 3])
      >>> tm.assert_index_equal(a, b)
      """
      if isinstance(left, ps.Index):
          left = left.to_pandas()
      if isinstance(right, ps.Index):
          right = right.to_pandas()
  
      pd.testing.assert_index_equal(  # type: ignore[call-arg]
          left,
          right,
          exact=exact,
          check_names=check_names,
          check_exact=check_exact,
          check_categorical=check_categorical,
          check_order=check_order,
          rtol=rtol,
          atol=atol,
          obj=obj,
      )
  
imports: from typing import Literal, Union
  import pyspark.pandas
label_desc: Use image node_id 3 for calling a global function with example usage: assert_index_equal(left, right, exact, check_names, check_exact, check_categorical, check_order, rtol, atol, obj) without return types