code: def create_agent_recycled(
      sess,
      environment,
      agent_name=None,
      summary_writer=None,
      debug_mode=False,
  ):
      """Creates an agent.
  
      Args:
        sess: A `tf.compat.v1.Session` object for running associated ops.
        environment: A gym environment (e.g. Atari 2600).
        agent_name: str, name of the agent to create.
        summary_writer: A Tensorflow summary writer to pass to the agent
          for in-agent training statistics in Tensorboard.
        debug_mode: bool, whether to output Tensorboard summaries. If set to true,
          the agent will output in-episode statistics to Tensorboard. Disabled by
          default as this results in slower training.
  
      Returns:
        agent: An RL agent.
  
      Raises:
        ValueError: If `agent_name` is not in supported list.
      """
      assert agent_name is not None
      del sess
      if not debug_mode:
          summary_writer = None
      if agent_name.startswith("dqn"):
          return recycled_dqn_agents.RecycledDQNAgent(
              num_actions=environment.action_space.n,
              summary_writer=summary_writer,
          )
      elif agent_name.startswith("rainbow"):
          return recycled_rainbow_agent.RecycledRainbowAgent(
              num_actions=environment.action_space.n,
              summary_writer=summary_writer,
          )
      elif agent_name.startswith("atari100k"):
          return recycled_atari100k_rainbow_agent.RecycledAtari100kRainbowAgent(
              num_actions=environment.action_space.n,
              summary_writer=summary_writer,
          )
      else:
          raise ValueError("Unknown agent: {}".format(agent_name))
  
file_path: dopamine/dopamine/labs/redo/train.py
imports: from absl import app
  from absl import flags
  from absl import logging
  from dopamine.discrete_domains import run_experiment
  from dopamine.labs.atari_100k import eval_run_experiment
  from dopamine.labs.redo import recycled_atari100k_rainbow_agent
  from dopamine.labs.redo import recycled_dqn_agents
  from dopamine.labs.redo import recycled_rainbow_agent
  import gin
  import tensorflow
label_desc: Use image node_id 1 for calling a global function with example usage: create_agent_recycled(sess, environment, agent_name, summary_writer, debug_mode) and returns: recycled_dqn_agents, recycled_rainbow_agent, recycled_atari100k_rainbow_agent