code: def create_synthetic_dataset(
      generator=skl_make_reg,
      n_samples=100,
      n_features=10,
      test_size=0.25,
      random_state_generator=None,
      random_state_train_test_split=None,
      dtype=np.float32,
      **kwargs,
  ):
      X, y = generator(
          n_samples=n_samples,
          n_features=n_features,
          random_state=random_state_generator,
          **kwargs,
      )
  
      X_train, X_test, y_train, y_test = train_test_split(
          X,
          y,
          test_size=test_size,
          random_state=random_state_train_test_split,
      )
  
      X_train = X_train.astype(dtype)
      X_test = X_test.astype(dtype)
      y_train = y_train.astype(dtype)
      y_test = y_test.astype(dtype)
  
      return X_train, X_test, y_train, y_test
  
imports: import pytest
  from cuml.internals.mem_type import MemoryType
  from cuml.internals.input_utils import input_to_cuml_array, is_array_like
  from cuml.internals.base import Base
  import cuml
  from sklearn.model_selection import train_test_split
  from sklearn.metrics import mean_squared_error, brier_score_loss
  from sklearn.datasets import make_classification, make_regression
  from sklearn import datasets
  from pylibraft.common.cuda import Stream
  from sklearn.datasets import make_regression
  from numba.cuda.cudadrv.devicearray import DeviceNDArray
  from numbers import Number
  from cuml.internals.safe_imports import gpu_only_import_from
  from itertools import dropwhile
  from copy import deepcopy
  from cuml.internals.safe_imports import cpu_only_import
  import inspect
  from textwrap import dedent, indent
  from cuml.internals.safe_imports import gpu_only_import
label_desc: Use image node_id 25 for calling a global function with example usage: create_synthetic_dataset(generator, n_samples, n_features, test_size, random_state_generator, random_state_train_test_split, dtype) and returns: X_train,  X_test,  y_train,  y_test