class_docstr: Google robot pushing dataset.
code: def parse_frames(self, filename):
      image_key = "move/{}/image/encoded"
      action_key = "move/{}/commanded_pose/vec_pitch_yaw"
      state_key = "move/{}/endeffector/vec_pitch_yaw"
  
      for serialized_example in tf.python_io.tf_record_iterator(
          filename
      ):
          x = tf.train.Example()
          x.ParseFromString(serialized_example)
          # there are 6 features per frame
          nf = len(x.features.feature.keys()) // 6
          # it seems features after 60 don't have any image
          nf = min(nf, self.max_number_of_frames_per_video)
  
          for i in range(nf):
              image_name = image_key.format(i)
              action_name = action_key.format(i)
              state_name = state_key.format(i)
  
              byte_str = x.features.feature[
                  image_name
              ].bytes_list.value[0]
              img = PIL_Image().open(io.BytesIO(byte_str))
              # The original images are much bigger than 64x64
              img = img.resize(
                  (self.frame_width, self.frame_height),
                  resample=PIL_Image().BILINEAR,
              )
              arr = np.array(img.getdata())
              frame = arr.reshape(
                  self.frame_width, self.frame_height, self.num_channels
              )
  
              state = x.features.feature[state_name].float_list.value
              action = x.features.feature[action_name].float_list.value
  
              yield i, frame, state, action
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import io
  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 registry
  import tensorflow.compat.v1
label_desc: Use image node_id 7 for calling the VideoGoogleRobotPushing obj's underlying member method code with example usage: obj.parse_frames(filename) without return types