class_docstr: Run simulated and real env side-by-side for comparison.
  
  Displays three windows - one for real environment, second for simulated
  and third for their differences.
  
  Normal actions are passed to both environments.
  
  Special Actions:
    RESTART_SIMULATED_ENV_ACTION: restart simulated environment only, using
      current frames from real environment.
    See `PlayerEnv` for rest of special actions.
  
  Naming conventions:
    envs_step_tuples: dictionary with two keys.
    {
      "real_env": (observation, reward, done, info),
      "sim_env": (observation, reward, done, info)
    }
class_docstr_tok: ["Run","simulated","and","real","env","side-by-side","for","comparison",".","Displays","three","windows","-","one","for","real","environment",",","second","for","simulated","and","third","for","their","differences",".","Normal","actions","are","passed","to","both","environments",".","Special","Actions",":","RESTART_SIMULATED_ENV_ACTION",":","restart","simulated","environment","only",",","using","current","frames","from","real","environment",".","See","`","PlayerEnv","`","for","rest","of","special","actions",".","Naming","conventions",":","envs_step_tuples",":","dictionary","with","two","keys",".","{","``","real_env","''",":","(","observation",",","reward",",","done",",","info",")",",","``","sim_env","''",":","(","observation",",","reward",",","done",",","info",")","}"]
docstr: Construct observation, return usual step tuple.
  
  Args:
    envs_step_tuples: tuples.
  
  Returns:
    Step tuple: ob, reward, done, info
      ob: concatenated images [simulated observation, real observation,
        difference], with additional informations in header.
      reward: real environment reward
      done: True iff. envs_step_tuples['real_env'][2] is True
      info: real environment info
docstr_tok: ["Construct","observation",",","return","usual","step","tuple",".","Args",":","envs_step_tuples",":","tuples",".","Returns",":","Step","tuple",":","ob",",","reward",",","done",",","info","ob",":","concatenated","images","[","simulated","observation",",","real","observation",",","difference","]",",","with","additional","informations","in","header",".","reward",":","real","environment","reward","done",":","True","iff",".","envs_step_tuples","[","'real_env","'","]","[","2","]","is","True","info",":","real","environment","info"]
code: def _player_step_tuple(self, envs_step_tuples):
      """Construct observation, return usual step tuple.
  
      Args:
        envs_step_tuples: tuples.
  
      Returns:
        Step tuple: ob, reward, done, info
          ob: concatenated images [simulated observation, real observation,
            difference], with additional informations in header.
          reward: real environment reward
          done: True iff. envs_step_tuples['real_env'][2] is True
          info: real environment info
      """
      ob_real, reward_real, _, _ = envs_step_tuples["real_env"]
      ob_sim, reward_sim, _, _ = envs_step_tuples["sim_env"]
      ob_err = absolute_hinge_difference(ob_sim, ob_real)
  
      ob_real_aug = self._augment_observation(
          ob_real, reward_real, self.cumulative_real_reward
      )
      ob_sim_aug = self._augment_observation(
          ob_sim, reward_sim, self.cumulative_sim_reward
      )
      ob_err_aug = self._augment_observation(
          ob_err,
          reward_sim - reward_real,
          self.cumulative_sim_reward - self.cumulative_real_reward,
      )
      ob = np.concatenate([ob_sim_aug, ob_real_aug, ob_err_aug], axis=1)
      _, reward, done, info = envs_step_tuples["real_env"]
      return ob, reward, done, info
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import gym
  from gym.utils import play
  import numpy
  from tensor2tensor.bin import t2t_trainer
  from tensor2tensor.rl import player_utils
  from tensor2tensor.rl.envs.simulated_batch_env import PIL_Image
  from tensor2tensor.rl.envs.simulated_batch_env import PIL_ImageDraw
  from tensor2tensor.rl.envs.simulated_batch_gym_env import FlatBatchEnv
  from tensor2tensor.rl.rl_utils import absolute_hinge_difference
  from tensor2tensor.rl.rl_utils import full_game_name
  import tensor2tensor.rl.trainer_model_based_params
  from tensor2tensor.utils import registry
  import tensorflow.compat.v1
label_desc: Use image node_id 4 for calling the SimAndRealEnvPlayer obj's underlying member method code with example usage: obj._player_step_tuple(envs_step_tuples) and returns: ob,  reward,  done,  info