code: def get_default_behavior_policy(
      networks: D4PGNetworks, config: d4pg_config.D4PGConfig
  ) -> actor_core_lib.FeedForwardPolicy:
      """Selects action according to the training policy."""
  
      def behavior_policy(
          params: networks_lib.Params,
          key: networks_lib.PRNGKey,
          observation: types.NestedArray,
      ):
          action = networks.policy_network.apply(params, observation)
          if config.sigma != 0:
              action = rlax.add_gaussian_noise(
                  key, action, config.sigma
              )
          return action
  
      return behavior_policy
  
file_path: acme/acme/agents/jax/d4pg/networks.py
imports: import dataclasses
  from typing import Sequence
  from acme import specs
  from acme import types
  from acme.agents.jax import actor_core
  from acme.agents.jax.d4pg import config
  from acme.jax import networks
  from acme.jax import utils
  import haiku
  import jax.numpy
  import numpy
  import rlax
label_desc: Use image node_id 1 for calling a global function with example usage: get_default_behavior_policy(networks, config) and returns: behavior_policy, action