code: def create_train_datasets(config, batch_size):
      x_train, y_train = linear_dataset(size=NUM_TRAIN_SAMPLES)
  
      train_dataset = tf.data.Dataset.from_tensor_slices(
          (x_train, y_train)
      )
      train_dataset = train_dataset.shuffle(NUM_TRAIN_SAMPLES).batch(
          batch_size
      )
  
      return train_dataset
  
imports: import os
  from unittest import TestCase
  import numpy
  import pytest
  import tensorflow
  from bigdl.orca.learn.tf2 import Estimator
  from bigdl.orca.ray import OrcaRayContext
  from bigdl.orca import OrcaContext
label_desc: Use image node_id 2 for calling a global function with example usage: create_train_datasets(config, batch_size) and returns: train_dataset