code: def create_agent(
      action_shape: Union[
          Tuple[int, ...], int
      ] = 4,  # pytype: disable=annotation-type-mismatch  # numpy-scalars
      eval_mode: bool = False,
      min_replay_history: int = 10_000,
      update_period: int = 4,
      seed: int = 0,
      observation_shape: Tuple[int, ...] = OBSERVATION_SHAPE,
      observation_dtype: np.dtype = np.float32,
      stack_size: int = 1,
  ) -> sac_agent.SACAgent:
      return sac_agent.SACAgent(
          action_shape=action_shape,
          action_limits=(
              np.full(action_shape, -1.0),
              np.full(action_shape, 1.0),
          ),
          observation_shape=observation_shape,
          observation_dtype=observation_dtype,
          stack_size=stack_size,
          min_replay_history=min_replay_history,
          update_period=update_period,
          eval_mode=eval_mode,
          seed=seed,
      )
  
imports: import copy
  import functools
  import operator
  import random
  from typing import Any, Tuple, Union
  from unittest import mock
  from absl.testing import absltest
  from absl.testing import parameterized
  from dopamine.jax.agents.sac import sac_agent
  import flax
  import gin
  import jax
  import numpy
label_desc: Use image node_id 2 for calling a global function with example usage: create_agent(action_shape, eval_mode, min_replay_history, update_period, seed, observation_shape, observation_dtype, stack_size) and returns: sac_agent