code: def create_default_dataset(x, feature_names=("inputs", "targets")):
      output_types = {
          feature_name: tf.int32 for feature_name in feature_names
      }
      output_shapes = {
          feature_name: [None] for feature_name in feature_names
      }
  
      ds = tf.data.Dataset.from_generator(
          lambda: x,
          output_types=output_types,
          output_shapes=output_shapes,
      )
      return ds
  
file_path: mesh/mesh_tensorflow/transformer/dataset_test.py
imports: from absl.testing import absltest
  from absl.testing import parameterized
  from mesh_tensorflow.transformer import dataset
  import numpy
  import tensorflow.compat.v1
  import tensorflow_datasets
label_desc: Use image node_id 1 for calling a global function with example usage: create_default_dataset(x, feature_names) and returns: ds