code: def _pandas_indexing(X, key, key_dtype, axis):
      """Index a dataframe or a series"""
      if hasattr(key, "shape"):
          # Work-around for indexing with read-only key in pandas
          # FIXME: solved in pandas 0.25
          key = np.asarray(key)
          key = key if key.flags.writeable else key.copy()
      elif isinstance(key, tuple):
          key = list(key)
      # check whether we should index with loc or iloc
      indexer = X.iloc if key_dtype == "int" else X.loc
      return indexer[:, key] if axis else indexer[key]
  
imports: from ..preprocessing import FunctionTransformer
  from ....thirdparty_adapters import check_array
  from ..utils.validation import check_is_fitted
  from ..utils.skl_dependencies import TransformerMixin, BaseComposition, BaseEstimator
  from cuml.internals import _deprecate_pos_args
  from cuml.internals.array_sparse import SparseCumlArray
  from cuml.internals.global_settings import _global_settings_data
  import cuml
  from itertools import chain
  from itertools import compress
  from joblib import Parallel
  import functools
  import timeit
  import numbers
  from cuml.internals.import_utils import has_sklearn
  from contextlib import contextmanager
  from collections import defaultdict
  import warnings
  from cuml.internals.safe_imports import cpu_only_import_from
  from cuml.internals.safe_imports import gpu_only_import_from
  from cuml.internals.safe_imports import cpu_only_import
  from cuml.internals.safe_imports import gpu_only_import
label_desc: Use image node_id 6 for calling a global function with example usage: _pandas_indexing(X, key, key_dtype, axis) and returns: unknown