class_docstr: Force even dimentions of both height and width by adding zeros.
class_docstr_tok: ["Force","even","dimentions","of","both","height","and","width","by","adding","zeros","."]
docstr: Add single zero row/column to observation if needed.
docstr_tok: ["Add","single","zero","row\/column","to","observation","if","needed","."]
code: def observation(self, frame):
      """Add single zero row/column to observation if needed."""
      if frame.shape == self.observation_space.shape:
          return frame
      else:
          extended_frame = np.zeros(
              self.observation_space.shape, self.observation_space.dtype
          )
          assert self.HW_AXES == (0, 1)
          extended_frame[: frame.shape[0], : frame.shape[1]] = frame
          return extended_frame
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import copy
  import os
  import re
  import gym
  import numpy
  import six
  from tensor2tensor.models.research.rl import get_policy
  from tensor2tensor.models.research.rl import make_simulated_env_fn_from_hparams
  from tensor2tensor.rl import rl_utils
  from tensor2tensor.rl.envs.simulated_batch_gym_env import FlatBatchEnv
  from tensor2tensor.utils import hparam
  from tensor2tensor.utils import trainer_lib
  from tensor2tensor.utils.misc_utils import camelcase_to_snakecase
  import tensorflow.compat.v1
label_desc: Use image node_id 2 for calling the ExtendToEvenDimentions obj's underlying member method code with example usage: obj.observation(frame) and returns: frame, extended_frame