code: def _check_is_permutation(indices, n_samples):
      """Check whether indices is a reordering of the array np.arange(n_samples)
  
      Parameters
      ----------
      indices : ndarray
          int array to test
      n_samples : int
          number of expected elements
  
      Returns
      -------
      is_partition : bool
          True iff sorted(indices) is np.arange(n)
      """
      if len(indices) != n_samples:
          return False
      hit = np.zeros(n_samples, dtype=bool)
      hit[indices] = True
      if not np.all(hit):
          return False
      return True
  
imports: import numbers
  import time
  import warnings
  from collections import Counter
  from contextlib import suppress
  from functools import partial
  from numbers import Real
  from traceback import format_exc
  import numpy
  import scipy.sparse
  from joblib import logger
  from ..base import clone, is_classifier
  from ..exceptions import FitFailedWarning
  from ..metrics import check_scoring, get_scorer_names
  from ..metrics._scorer import _check_multimetric_scoring, _MultimetricScorer
  from ..preprocessing import LabelEncoder
  from ..utils import _safe_indexing, check_random_state, indexable
  from ..utils._param_validation import HasMethods, Integral, Interval, StrOptions, validate_params
  from ..utils.metaestimators import _safe_split
  from ..utils.parallel import Parallel, delayed
  from ..utils.validation import _check_fit_params, _num_samples
  from ._split import check_cv
label_desc: Use image node_id 11 for calling a global function with example usage: _check_is_permutation(indices, n_samples) and returns: True, False, False