code: def generate_bagging_indices(
      random_state,
      bootstrap_features,
      n_features,
      min_features,
      max_features,
  ):
      """Randomly draw feature indices. Internal use only.
  
      Modified from sklearn/ensemble/bagging.py
  
      Parameters
      ----------
      random_state : RandomState
          A random number generator instance to define the state of the random
          permutations generator.
  
      bootstrap_features : bool
          Specifies whether to bootstrap indice generation
  
      n_features : int
          Specifies the population size when generating indices
  
      min_features : int
          Lower limit for number of features to randomly sample
  
      max_features : int
          Upper limit for number of features to randomly sample
  
      Returns
      -------
      feature_indices : numpy array, shape (n_samples,)
          Indices for features to bag
  
      """
  
      # Get valid random state
      random_state = check_random_state(random_state)
  
      # decide number of features to draw
      random_n_features = random_state.randint(
          min_features, max_features
      )
  
      # Draw indices
      feature_indices = generate_indices(
          random_state,
          bootstrap_features,
          n_features,
          random_n_features,
      )
  
      return feature_indices
  
imports: from __future__ import division
  from __future__ import print_function
  import numbers
  import numpy
  import sklearn
  from numpy import percentile
  from sklearn.metrics import precision_score
  from sklearn.preprocessing import StandardScaler
  from sklearn.utils import check_array
  from sklearn.utils import check_consistent_length
  from sklearn.utils import check_random_state
  from sklearn.utils import column_or_1d
  from sklearn.utils.random import sample_without_replacement
label_desc: Use image node_id 13 for calling a global function with example usage: generate_bagging_indices(random_state, bootstrap_features, n_features, min_features, max_features) and returns: feature_indices