code: def assert_frame_equal(
      left,
      right,
      check_dtype=True,
      check_index_type="equiv",
      check_column_type="equiv",
      check_frame_type=True,
      check_names=True,
      by_blocks=False,
      check_exact=False,
      check_datetimelike_compat=False,
      check_categorical=True,
      check_like=False,
      rtol=1e-5,
      atol=1e-8,
      obj="DataFrame",
  ):
      """
      Check that left and right DataFrame are equal
  
      This function is intended to compare two DataFrame and output
      any differences. Additional parameters allow varying the strictness
      of the equality checks performed.
  
      Parameters
      ----------
      left : DataFrame
          left DataFrame to compare
      right : DataFrame
          right DataFrame to compare
      check_dtype : bool, default True
          Whether to check the DataFrame dtype is identical.
      check_index_type : bool or {'equiv'}, default 'equiv'
          Whether to check the Index class, dtype and inferred_type
          are identical.
      check_column_type : bool, default True
          Whether to check the column class, dtype and
          inferred_type are identical. Currently it is idle,
          and similar to pandas.
      check_frame_type : bool, default True
          Whether to check the DataFrame class is identical.
      check_names : bool, default True
          Whether to check that the names attribute for both the index and
          column attributes of the DataFrame is identical.
      check_exact : bool, default False
          Whether to compare number exactly.
      by_blocks : bool, default False
          Not supported
      check_exact : bool, default False
          Whether to compare number exactly.
      check_datetime_like_compat : bool, default False
          Compare datetime-like which is comparable ignoring dtype.
      check_categorical : bool, default True
          Whether to compare internal Categorical exactly.
      check_like : bool, default False
          If True, ignore the order of index & columns.
          Note: index labels must match their respective
          rows (same as in columns) - same labels must be with the same data.
      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 'DataFrame'
          Specify object name being compared, internally used to
          show appropriate assertion message.
  
      Examples
      --------
      >>> import cudf
      >>> df1 = cudf.DataFrame({"a":[1, 2], "b":[1.0, 2.0]}, index=[1, 2])
      >>> df2 = cudf.DataFrame({"a":[1, 2], "b":[1.0, 2.0]}, index=[2, 3])
      >>> cudf.testing.assert_frame_equal(df1, df2)
      ......
      ......
      AssertionError: ColumnBase are different
      <BLANKLINE>
      values are different (100.0 %)
      [left]:  [1 2]
      [right]: [2 3]
  
      >>> df2 = cudf.DataFrame({"a":[1, 2], "c":[1.0, 2.0]}, index=[1, 2])
      >>> cudf.testing.assert_frame_equal(df1, df2)
      ......
      ......
      AssertionError: DataFrame.columns are different
      <BLANKLINE>
      DataFrame.columns values are different (50.0 %)
      [left]: Index(['a', 'b'], dtype='object')
      right]: Index(['a', 'c'], dtype='object')
  
      >>> df2 = cudf.DataFrame({"a":[1, 2], "b":[1.0, 3.0]}, index=[1, 2])
      >>> cudf.testing.assert_frame_equal(df1, df2)
      ......
      ......
      AssertionError: Column name="b" are different
      <BLANKLINE>
      values are different (50.0 %)
      [left]:  [1. 2.]
      [right]: [1. 3.]
  
      This will pass without any hitch:
  
      >>> df2 = cudf.DataFrame({"a":[1, 2], "b":[1.0, 2.0]}, index=[1, 2])
      >>> cudf.testing.assert_frame_equal(df1, df2)
      """
      _check_isinstance(left, right, cudf.DataFrame)
  
      if check_frame_type:
          assert isinstance(left, type(right))
  
      # shape comparison
      if left.shape != right.shape:
          raise AssertionError("left and right shape mismatch")
  
      if check_like:
          left, right = left.reindex(index=right.index), right
          right = right[list(left._data.names)]
  
      # index comparison
      assert_index_equal(
          left.index,
          right.index,
          exact=check_index_type,
          check_names=check_names,
          check_exact=check_exact,
          check_categorical=check_categorical,
          rtol=rtol,
          atol=atol,
          obj=f"{obj}.index",
      )
  
      pd.testing.assert_index_equal(
          left._data.to_pandas_index(),
          right._data.to_pandas_index(),
          exact=check_column_type,
          check_names=check_names,
          check_exact=check_exact,
          check_categorical=check_categorical,
          rtol=rtol,
          atol=atol,
          obj=f"{obj}.columns",
      )
  
      for col in left._column_names:
          assert_column_equal(
              left._data[col],
              right._data[col],
              check_dtype=check_dtype,
              check_exact=check_exact,
              check_datetimelike_compat=check_datetimelike_compat,
              check_categorical=check_categorical,
              rtol=rtol,
              atol=atol,
              obj=f'Column name="{col}"',
          )
  
file_path: cudf/python/cudf/cudf/testing/testing.py
imports: from __future__ import annotations
  from typing import Union
  import cupy
  import numpy
  import pandas
  import cudf
  from cudf._lib.unary import is_nan
  from cudf.api.types import is_categorical_dtype, is_numeric_dtype, is_string_dtype
  from cudf.core.missing import NA, NaT
label_desc: Use image node_id 9 for calling a global function with example usage: assert_frame_equal(left, right, check_dtype, check_index_type, check_column_type, check_frame_type, check_names, by_blocks, check_exact, check_datetimelike_compat, check_categorical, check_like, rtol, atol, obj) without return types