class_docstr: Berkeley (BAIR) robot pushing dataset.
class_docstr_tok: ["Berkeley","(","BAIR",")","robot","pushing","dataset","."]
code: def generate_samples(self, data_dir, tmp_dir, dataset_split):
      path = generator_utils.maybe_download(
          tmp_dir, os.path.basename(DATA_URL), DATA_URL
      )
  
      tar = tarfile.open(path)
      tar.extractall(tmp_dir)
      tar.close()
  
      if dataset_split == problem.DatasetSplit.TEST:
          base_dir = os.path.join(tmp_dir, "softmotion30_44k/test/*")
          filenames = tf.gfile.Glob(base_dir)
      else:
          base_dir = os.path.join(tmp_dir, "softmotion30_44k/train/*")
          filenames = tf.gfile.Glob(base_dir)
  
          # the test-set contains just 256 videos so this should be sufficient.
          if dataset_split == problem.DatasetSplit.TRAIN:
              filenames = filenames[:-2]
          else:
              filenames = filenames[-2:]
  
      for frame_number, frame, state, action in self.parse_frames(
          filenames
      ):
          yield {
              "frame_number": [frame_number],
              "frame": frame,
              "state": state,
              "action": action,
          }
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import os
  import tarfile
  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
label_desc: Use image node_id 14 for calling the VideoBairRobotPushing obj's underlying member method code with example usage: obj.generate_samples(data_dir, tmp_dir, dataset_split) without return types