code: def _is_polars_df(X):
      """Return True if the X is a polars dataframe."""
      if hasattr(X, "columns") and hasattr(X, "schema"):
          # Likely a polars DataFrame, we explicitly check the type to confirm.
          try:
              pl = sys.modules["polars"]
          except KeyError:
              return False
          return isinstance(X, pl.DataFrame)
      return False
  
imports: import numbers
  import operator
  import sys
  import warnings
  from contextlib import suppress
  from functools import reduce, wraps
  from inspect import Parameter, isclass, signature
  import joblib
  import numpy
  import scipy.sparse
  from ..None import get_config
  from ..exceptions import DataConversionWarning, NotFittedError, PositiveSpectrumWarning
  from ..utils._array_api import _asarray_with_order, _is_numpy_namespace, get_namespace
  from ..utils.fixes import ComplexWarning, _preserve_dia_indices_dtype
  from ._isfinite import FiniteStatus, cy_isfinite
  from .fixes import _object_dtype_isnan
label_desc: Use image node_id 38 for calling a global function with example usage: _is_polars_df(X) and returns: False, isinstance, False