code: def indices_to_mask(indices, mask_length):
      """Convert list of indices to boolean mask.
  
      Parameters
      ----------
      indices : list-like
          List of integers treated as indices.
      mask_length : int
          Length of boolean mask to be generated.
  
      Returns
      -------
      mask : 1d boolean nd-array
          Boolean array that is True where indices are present, else False.
      """
      if mask_length <= np.max(indices):
          raise ValueError(
              "mask_length must be greater than max(indices)"
          )
  
      mask = np.zeros(mask_length, dtype=np.bool)
      mask[indices] = True
  
      return mask
  
imports: from collections import Sequence
  import numpy
  from scipy.sparse import issparse
  import warnings
  from .murmurhash import murmurhash3_32
  from .validation import as_float_array, assert_all_finite, check_random_state, column_or_1d, check_array, check_consistent_length, check_X_y, indexable, check_symmetric
  from .deprecation import deprecated
  from .class_weight import compute_class_weight, compute_sample_weight
  from ..externals.joblib import cpu_count
  from ..exceptions import ConvergenceWarning
  from ..exceptions import DataConversionWarning
label_desc: Use image node_id 11 for calling a global function with example usage: indices_to_mask(indices, mask_length) and returns: mask