code: def unvectorize_select_action(actor_core: ActorCore) -> ActorCore:
      """Makes an actor core's select_action method expect unbatched arguments."""
  
      def unvectorized_select_action(
          params: networks_lib.Params,
          observations: networks_lib.Observation,
          state: State,
      ) -> Tuple[networks_lib.Action, State]:
          observations, state = utils.add_batch_dim(
              (observations, state)
          )
          actions, state = actor_core.select_action(
              params, observations, state
          )
          return utils.squeeze_batch_dim((actions, state))
  
      return ActorCore(
          init=actor_core.init,
          select_action=unvectorized_select_action,
          get_extras=actor_core.get_extras,
      )
  
file_path: acme/acme/agents/jax/actor_core.py
imports: import dataclasses
  from typing import Callable, Generic, Mapping, Tuple, TypeVar, Union
  from acme import types
  from acme.jax import networks
  from acme.jax import utils
  from acme.jax.types import PRNGKey
  import chex
  import jax
  import jax.numpy
label_desc: Use image node_id 2 for calling a global function with example usage: unvectorize_select_action(actor_core) and returns: ActorCore, utils