code: def assert_dataframe_consistent(self, expected, real):
      dataframe_types = (pd.DataFrame,)
      if cudf is not None:
          dataframe_types += (cudf.DataFrame,)
  
      if isinstance(real, tuple):
          # allow returning a batch of chunks for some operands
          real = real[0]
      if not isinstance(real, dataframe_types):
          raise AssertionError(
              f"Type of real value ({type(real)}) not DataFrame"
          )
      self.assert_shape_consistent(expected.shape, real.shape)
      if (
          not np.isnan(expected.shape[1])
          and expected.dtypes is not None
      ):
          if self._check_options["check_dtypes"]:
              # ignore check when columns length is nan or dtypes undefined
              pd.testing.assert_index_equal(
                  expected.dtypes.index,
                  self.adapt_index_value(real.dtypes.index),
              )
  
              try:
                  for expected_dtype, real_dtype in zip(
                      expected.dtypes, real.dtypes
                  ):
                      self.assert_dtype_consistent(
                          expected_dtype, real_dtype
                      )
              except AssertionError:
                  raise AssertionError(
                      f"dtypes in metadata {expected.dtype} cannot cast "
                      f"to real dtype {real.dtype}"
                  )
  
      if self._check_options["check_columns_value"] and not np.isnan(
          expected.shape[1]
      ):
          self.assert_index_value_consistent(
              expected.columns_value, real.columns
          )
      if self._check_options["check_index_value"] and not np.isnan(
          expected.shape[0]
      ):
          self.assert_index_value_consistent(
              expected.index_value, real.index
          )
  
imports: import fnmatch
  import functools
  import inspect
  import itertools
  import logging
  import os
  import sys
  import time
  import types
  from typing import Dict
  import numpy
  import pandas
  import pytest
  from ..core.operand import OperandStage
  from ..utils import lazy_import
label_desc: Use image node_id 6 for calling the ObjectCheckMixin obj's underlying member method code with example usage: obj.assert_dataframe_consistent(expected, real) without return types