class_docstr: Old SV2P code. Only for legacy reasons.
class_docstr_tok: ["Old","SV2P","code",".","Only","for","legacy","reasons","."]
code: def get_input_if_exists(self, features, key, batch_size, num_frames):
      if key in features:
          x = features[key]
      else:
          x = tf.zeros(
              (batch_size, num_frames, 1, self.hparams.hidden_size)
          )
      return common_video.swap_time_and_batch_axes(x)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from tensor2tensor.layers import common_layers
  from tensor2tensor.layers import common_video
  from tensor2tensor.layers import discretization
  from tensor2tensor.models.video import base
  from tensor2tensor.models.video import base_vae
  from tensor2tensor.utils import contrib
  from tensor2tensor.utils import registry
  import tensorflow.compat.v1
label_desc: Use image node_id 2 for calling the NextFrameSv2pLegacy obj's underlying member method code with example usage: obj.get_input_if_exists(features, key, batch_size, num_frames) and returns: common_video