def flatten_zip_dataset(*args):
  """A list of examples to a dataset containing mixed examples.

  Given a list of `n` dataset examples, flatten them by converting
  each element into a dataset and concatenating them to convert into a
  single dataset.

  Args:
    *args: A list containing one example each from `n` different datasets.

  Returns:
    flattened: A new dataset containing the examples from the list as part
      of a single dataset.
  """
  flattened = tf.data.Dataset.from_tensors(args[0])
  for ex in args[1:]:
    flattened = flattened.concatenate(tf.data.Dataset.from_tensors(ex))
  return flattened