code: def _create_rdd_x_y(x, y, input_names, output_names, sc):
      from tensorflow.python.keras.engine import training_utils
  
      x = training_utils.standardize_input_data(
          x,
          input_names,
          check_batch_axis=False,
          exception_prefix="input",
      )
      y = training_utils.standardize_input_data(
          y,
          output_names,
          shapes=None,
          check_batch_axis=False,
          exception_prefix="target",
      )
  
      num_samples = x[0].shape[0]
      num_inputs = len(x)
      num_targets = len(y)
  
      input_data = []
      for i in range(num_samples):
          inputs = []
          for j in range(num_inputs):
              inputs.append(x[j][i])
  
          targets = []
          for j in range(num_targets):
              if y[j][i].ndim == 0:
                  targets.append(np.expand_dims(y[j][i], axis=1))
              else:
                  targets.append(y[j][i])
  
          input_data.append((inputs, targets))
  
      x_meta = dict(
          [
              (
                  input_names[i],
                  (
                      input_data[0][0][i].dtype,
                      input_data[0][0][i].shape,
                  ),
              )
              for i in range(len(input_names))
          ]
      )
  
      y_meta = dict(
          [
              (
                  output_names[i],
                  (
                      input_data[0][1][i].dtype,
                      input_data[0][1][i].shape,
                  ),
              )
              for i in range(len(input_names))
          ]
      )
  
      rdd = sc.parallelize(input_data)
      return rdd, x_meta, y_meta
  
imports: import numpy
  from bigdl.dllib.optim.optimizer import MaxEpoch
  from bigdl.orca.tfpark.utils import evaluate_string_metrics
  from bigdl.dllib.utils.file_utils import enable_multi_fs_save, enable_multi_fs_load
  from bigdl.dllib.nncontext import getOrCreateSparkContext
  from bigdl.orca.tfpark.tf_dataset import TFNdarrayDataset, TFDataset, _standarize_feature_label_dataset, check_data_compatible
  from bigdl.orca.tfpark.tf_optimizer import TFOptimizer
  from bigdl.orca.tfpark.tf_predictor import TFPredictor
  from bigdl.dllib.utils.log4Error import *
label_desc: Use image node_id 1 for calling a global function with example usage: _create_rdd_x_y(x, y, input_names, output_names, sc) and returns: rdd,  x_meta,  y_meta