code: def _is_dataframe(obj, module=None) -> bool:
      """Test if an object is a dataframe type.
  
      Checks for a DataFrame type from multiple providers (Pandas, Modin etc.).
  
      Args:
          obj: The object to test.
          module (str, optional): Specify a dataframe type of a particular module. Default
              value of None allows any module to match.
  
      Returns:
          bool: True if the type matches.
      """
      is_module_dataframe = {
          "pandas": isinstance(obj, pandas.DataFrame)
      }
  
      if "modin" in sys.modules.keys():
          is_module_dataframe["modin"] = isinstance(
              obj, _compat["modin.pandas"].DataFrame  # type: ignore
          )
      else:
          # Modin not yet imported; use name checking to avoid expensive import
          # https://stackoverflow.com/questions/49577290/determine-if-object-is-of-type-foo-without-importing-type-foo
          is_module_dataframe["modin"] = False
          for cls in inspect.getmro(type(obj)):
              try:
                  if (
                      "modin" in cls.__module__
                      and cls.__name__ == "DataFrame"
                  ):
                      is_module_dataframe["modin"] = True
              except AttributeError:
                  pass
  
      if module is None:
          return any(is_module_dataframe.values())
      else:
          try:
              return is_module_dataframe.get(module, False)
          except KeyError:
              return False
  
imports: import sys
  import inspect
  import pandas
  from data_describe.compat._dependency import _compat
label_desc: Use image node_id 1 for calling a global function with example usage: _is_dataframe(obj, module) and returns: any, is_module_dataframe, False