code: def test_is_dataframe_like(monkeypatch, frame_value_counts):
      # When we drop support for pandas 1.0, this compat check can
      # be dropped
      if frame_value_counts:
          monkeypatch.setattr(
              pd.DataFrame,
              "value_counts",
              lambda x: None,
              raising=False,
          )
  
      df = pd.DataFrame({"x": [1, 2, 3]})
      ddf = dd.from_pandas(df, npartitions=1)
  
      assert is_dataframe_like(df)
      assert is_dataframe_like(ddf)
      assert not is_dataframe_like(df.x)
      assert not is_dataframe_like(ddf.x)
      assert not is_dataframe_like(df.index)
      assert not is_dataframe_like(ddf.index)
      assert not is_dataframe_like(pd.DataFrame)
  
      assert not is_series_like(df)
      assert not is_series_like(ddf)
      assert is_series_like(df.x)
      assert is_series_like(ddf.x)
      assert not is_series_like(df.index)
      assert not is_series_like(ddf.index)
      assert not is_series_like(pd.Series)
  
      assert not is_index_like(df)
      assert not is_index_like(ddf)
      assert not is_index_like(df.x)
      assert not is_index_like(ddf.x)
      assert is_index_like(df.index)
      assert is_index_like(ddf.index)
      assert not is_index_like(pd.Index)
  
      # The following checks support of class wrappers, which
      # requires the comparions of `x.__class__` instead of `type(x)`
      class DataFrameWrapper:
          __class__ = pd.DataFrame
  
      wrap = DataFrameWrapper()
      wrap.dtypes = None
      wrap.columns = None
      assert is_dataframe_like(wrap)
  
      class SeriesWrapper:
          __class__ = pd.Series
  
      wrap = SeriesWrapper()
      wrap.dtype = None
      wrap.name = None
      assert is_series_like(wrap)
  
      class IndexWrapper:
          __class__ = pd.Index
  
      wrap = IndexWrapper()
      wrap.dtype = None
      wrap.name = None
      assert is_index_like(wrap)
  
imports: from __future__ import annotations
  import re
  import warnings
  from collections.abc import Iterable
  import numpy
  import pandas
  import pytest
  from packaging.version import Version
  import dask
  import dask.dataframe
  from dask.dataframe._compat import PANDAS_GE_200, tm
  from dask.dataframe.core import apply_and_enforce
  from dask.dataframe.utils import UNKNOWN_CATEGORIES, assert_eq, check_matching_columns, check_meta, is_dataframe_like, is_index_like, is_series_like, make_meta, meta_frame_constructor, meta_nonempty, meta_series_constructor, pyarrow_strings_enabled, raise_on_meta_error, shard_df_on_index, valid_divisions
  from dask.local import get_sync
label_desc: Use image node_id 13 for calling a global function with example usage: test_is_dataframe_like(monkeypatch, frame_value_counts) without return types