code: def get_data_creators():
      def get_x_y(size, config):
          import pandas as pd
  
          values = np.random.randn(size, 4)
          df = pd.DataFrame(values, columns=["f1", "f2", "f3", "t"])
          selected_features = config["features"]
          x = df[selected_features].to_numpy()
          y = df["t"].to_numpy()
          return x, y
  
      from functools import partial
  
      train_data_creator = partial(get_x_y, 1000)
      val_data_creator = partial(get_x_y, 400)
      return train_data_creator, val_data_creator
  
file_path: analytics-zoo/pyzoo/test/zoo/orca/automl/xgboost/test_auto_xgb.py
imports: import pytest
  from zoo.orca.automl.xgboost import AutoXGBRegressor
  import numpy
  from unittest import TestCase
  from zoo.orca.automl import hp
label_desc: Use image node_id 2 for calling a global function with example usage: get_data_creators() and returns: train_data_creator,  val_data_creator, x,  y