class_docstr: MovingMnist Dataset.
code: def generate_samples(self, data_dir, tmp_dir, dataset_split):
      with tf.Graph().as_default():
          # train and eval set are generated on-the-fly.
          # test set is the official test-set.
          if dataset_split == problem.DatasetSplit.TEST:
              moving_ds = self.get_test_iterator(tmp_dir)
          else:
              moving_ds = self.get_train_iterator()
  
          next_video = moving_ds.get_next()
          with tf.Session() as sess:
              sess.run(moving_ds.initializer)
  
              n_samples = SPLIT_TO_SIZE[dataset_split]
              for _ in range(n_samples):
                  next_video_np = sess.run(next_video)
                  for frame_number, frame in enumerate(next_video_np):
                      yield {
                          "frame_number": [frame_number],
                          "frame": frame,
                      }
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import os
  import numpy
  from tensor2tensor.data_generators import generator_utils
  from tensor2tensor.data_generators import problem
  from tensor2tensor.data_generators import video_utils
  from tensor2tensor.layers import modalities
  from tensor2tensor.utils import contrib
  from tensor2tensor.utils import registry
  import tensorflow.compat.v1
  import tensorflow_datasets
  from tensorflow_datasets.video import moving_sequence
label_desc: Use image node_id 14 for calling the VideoMovingMnist obj's underlying member method code with example usage: obj.generate_samples(data_dir, tmp_dir, dataset_split) without return types