code: def _generate_idx(n, seed, n_train, n_test):
      """Generate train, test indices for a length-n array.
  
      Parameters
      ----------
      n : int
          The length of the array
      seed : int
          Seed for a RandomState
      n_train, n_test : int, 0 < n_train, n_test < n
          Number of samples to use for the train or
          test index.
  
      Notes
      -----
      """
      idx = check_random_state(seed).permutation(n)
  
      ind_test = idx[:n_test]
      ind_train = idx[n_test : n_train + n_test]
      return ind_train, ind_test
  
imports: import itertools
  import logging
  import numbers
  import warnings
  import dask
  import dask.array
  import dask.dataframe
  import numpy
  import sklearn.model_selection
  from sklearn.model_selection._split import BaseCrossValidator, _validate_shuffle_split
  from sklearn.utils import check_random_state
  from dask_ml._compat import DASK_2130, DASK_VERSION
  from dask_ml.utils import check_array, check_matching_blocks
  from .._utils import draw_seed
label_desc: Use image node_id 3 for calling a global function with example usage: _generate_idx(n, seed, n_train, n_test) and returns: ind_train,  ind_test