code: def make_networks(
      action_spec: types.NestedSpec,
      policy_layer_sizes: Sequence[int] = (10, 10),
      critic_layer_sizes: Sequence[int] = (10, 10),
  ) -> Dict[str, snt.Module]:
      """Creates networks used by the agent."""
  
      num_dimensions = np.prod(action_spec.shape, dtype=int)
      policy_layer_sizes = list(policy_layer_sizes) + [num_dimensions]
      critic_layer_sizes = list(critic_layer_sizes) + [1]
  
      policy_network = snt.Sequential(
          [networks.LayerNormMLP(policy_layer_sizes), tf.tanh]
      )
      # The multiplexer concatenates the (maybe transformed) observations/actions.
      critic_network = networks.CriticMultiplexer(
          critic_network=networks.LayerNormMLP(critic_layer_sizes)
      )
  
      return {
          "policy": policy_network,
          "critic": critic_network,
      }
  
file_path: acme/acme/agents/tf/ddpg/agent_test.py
imports: from typing import Dict, Sequence
  import acme
  from acme import specs
  from acme import types
  from acme.agents.tf import ddpg
  from acme.testing import fakes
  from acme.tf import networks
  import numpy
  import sonnet
  import tensorflow
  from absl.testing import absltest
label_desc: Use image node_id 1 for calling a global function with example usage: make_networks(action_spec, policy_layer_sizes, critic_layer_sizes) and returns: dict