code: def _get_data(format="numpy", n_classes=2):
      generator = (
          make_classification if n_classes > 0 else make_regression
      )
      params = dict(
          n_samples=100,
          n_features=5,
          n_informative=n_classes or 2,
          n_repeated=0,
          random_state=seed,
      )
      if generator is make_classification:
          params.update(n_classes=n_classes)
  
      X, y = generator(**params)
      X_train, X_test, y_train, y_test = train_test_split(
          X, y, random_state=seed, train_size=0.75
      )
      data = ns(
          X_train=X_train, X_test=X_test, y_train=y_train, y_test=y_test
      )
      if format == "h2o":
          for k, v in data.__dict__.items():
              setattr(data, k, h2o.H2OFrame(v))
      return data
  
file_path: h2o-3/h2o-py/tests/testdir_sklearn/pyunit_sklearn_estimators_as_transformers.py
imports: from collections import defaultdict
  from functools import partial
  import gc, inspect, os, sys
  import numpy
  from sklearn.datasets import make_classification, make_regression
  from sklearn.metrics import accuracy_score
  from sklearn.model_selection import train_test_split
  import h2o
  from h2o.sklearn.wrapper import H2OConnectionMonitorMixin
  from tests import pyunit_utils, Namespace
label_desc: Use image node_id 1 for calling a global function with example usage: _get_data(format, n_classes) and returns: data