code: def create_continuous_agent(
      environment: gym_lib.GymPreprocessing,
      agent_name: str,
      summary_writer: Optional[tensorboard.SummaryWriter] = None,
  ) -> dqn_agent.JaxDQNAgent:
      """Creates an agent.
  
      Args:
        environment:  A gym environment.
        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.
  
      Returns:
        An RL agent.
  
      Raises:
        ValueError: If `agent_name` is not in supported list.
      """
      assert agent_name is not None
      if agent_name == "sac":
          assert isinstance(environment.action_space, spaces.Box)
          assert isinstance(environment.observation_space, spaces.Box)
          return sac_agent.SACAgent(
              action_shape=environment.action_space.shape,
              action_limits=(
                  environment.action_space.low,
                  environment.action_space.high,
              ),
              observation_shape=environment.observation_space.shape,
              action_dtype=environment.action_space.dtype,
              observation_dtype=environment.observation_space.dtype,
              summary_writer=summary_writer,
          )
      else:
          raise ValueError(f"Unknown agent: {agent_name}")
  
imports: from typing import Optional
  from absl import logging
  from dopamine.discrete_domains import gym_lib
  from dopamine.discrete_domains import iteration_statistics
  from dopamine.discrete_domains import run_experiment
  from dopamine.jax.agents.dqn import dqn_agent
  from dopamine.jax.agents.sac import sac_agent
  from dopamine.labs.sac_from_pixels import deepmind_control_lib
  from dopamine.metrics import collector_dispatcher
  from dopamine.metrics import statistics_instance
  from flax.metrics import tensorboard
  import gin
  from gym import spaces
label_desc: Use image node_id 1 for calling a global function with example usage: create_continuous_agent(environment, agent_name, summary_writer) and returns: sac_agent