code: def _check_is_permutation(indices, n_samples):
      """Check whether indices is a reordering of the array np.arange(n_samples)
  
      Parameters
      ----------
      indices : ndarray
          integer 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: from __future__ import print_function
  from __future__ import division
  import warnings
  import numbers
  import time
  import numpy
  import scipy.sparse
  from ..base import is_classifier, clone
  from ..utils import indexable, check_random_state, safe_indexing
  from ..utils.fixes import astype
  from ..utils.validation import _is_arraylike, _num_samples
  from ..utils.metaestimators import _safe_split
  from ..externals.joblib import Parallel, delayed, logger
  from ..metrics.scorer import check_scoring
  from ..exceptions import FitFailedWarning
  from ._split import check_cv
label_desc: Use image node_id 6 for calling a global function with example usage: _check_is_permutation(indices, n_samples) and returns: True, False, False