code: def _blocked_train_test_split(blocked_data, y, oob_seed):
      n_samples = len(y)
      train_indices = _generate_sample_indices(
          oob_seed, n_samples, n_samples
      )
      test_indices = _generate_unsampled_indices(
          oob_seed, n_samples, n_samples
      )
      (
          train_blocked_data,
          test_blocked_data,
      ) = blocked_data.train_test_split(train_indices, test_indices)
      if y.ndim > 1:
          y_train = y[train_indices, :]
          y_test = y[test_indices, :]
      else:
          y_train = y[train_indices]
          y_test = y[test_indices]
      return (
          train_blocked_data,
          test_blocked_data,
          y_train,
          y_test,
          train_indices,
          test_indices,
      )
  
imports: from abc import ABC, abstractmethod
  import numpy
  from collections import defaultdict
  from sklearn.ensemble import BaseEnsemble
  from sklearn.ensemble._forest import _generate_unsampled_indices, _generate_sample_indices
  from .local_stumps import make_stumps, tree_feature_transform
label_desc: Use image node_id 4 for calling a global function with example usage: _blocked_train_test_split(blocked_data, y, oob_seed) and returns: train_blocked_data,  test_blocked_data,  y_train,  y_test,  train_indices,  test_indices