code: def _array_indexing(array, key, key_dtype, axis):
      """Index an array or scipy.sparse consistently across NumPy version"""
      if issparse(array):
          if key_dtype == "bool":
              key = np.asarray(key)
      return array[key] if axis == 0 else array[:, key]
  
imports: import numbers
  import numpy
  from itertools import compress
  from scipy.sparse import issparse
  from sklearn.model_selection import ParameterGrid
  from sklearn.utils.validation import check_is_fitted
label_desc: Use image node_id 15 for calling a global function with example usage: _array_indexing(array, key, key_dtype, axis) and returns: unknown