code: def make_env(env_type, real_env, sim_env_kwargs):
      """Factory function for envs."""
      return {
          "real": lambda: real_env.new_like(  # pylint: disable=g-long-lambda
              batch_size=sim_env_kwargs["batch_size"],
              store_rollouts=False,
          ),
          "simulated": lambda: rl_utils.SimulatedBatchGymEnvWithFixedInitialFrames(  # pylint: disable=g-long-lambda
              **sim_env_kwargs
          ),
      }[env_type]()
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import datetime
  import os
  from tensor2tensor.data_generators import gym_env
  from tensor2tensor.layers import common_video
  from tensor2tensor.models.research import rl
  from tensor2tensor.rl import rl_utils
  from tensor2tensor.rl import trainer_model_based_params
  from tensor2tensor.utils import flags
  from tensor2tensor.utils import hparam
  from tensor2tensor.utils import registry
  from tensor2tensor.utils import trainer_lib
  import tensorflow.compat.v1
label_desc: Use image node_id 14 for calling a global function with example usage: make_env(env_type, real_env, sim_env_kwargs) and returns: dict