code: def _pandas_indexing(X, key, key_dtype, axis):
      """Index a pandas 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()
      # 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: import copy
  import warnings
  from itertools import compress
  import dask
  import dask.array
  import dask.dataframe
  import numpy
  import packaging.version
  import scipy.sparse
  from dask.base import tokenize
  from dask.delayed import Delayed, delayed
  from sklearn.utils.validation import _is_arraylike, indexable
  from ..utils import _num_samples
label_desc: Use image node_id 11 for calling a global function with example usage: _pandas_indexing(X, key, key_dtype, axis) and returns: unknown