code: def make_networks(spec: specs.EnvironmentSpec) -> bc.BCNetworks:
      """Creates networks used by the agent."""
  
      final_layer_size = np.prod(spec.actions.shape, dtype=int)
  
      def _actor_fn(obs, is_training=False, key=None):
          # is_training and key allows to defined train/test dependant modules
          # like dropout.
          del is_training
          del key
          network = networks_lib.LayerNormMLP(
              [64, 64, final_layer_size], activate_final=False
          )
          return jax.nn.tanh(network(obs))
  
      policy = hk.without_apply_rng(hk.transform(_actor_fn))
  
      # Create dummy observations and actions to create network parameters.
      dummy_obs = utils.zeros_like(spec.observations)
      dummy_obs = utils.add_batch_dim(dummy_obs)
      policy_network = bc.BCPolicyNetwork(
          lambda key: policy.init(key, dummy_obs), policy.apply
      )
  
      return bc.BCNetworks(policy_network)
  
file_path: acme/acme/agents/jax/bc/pretraining_test.py
imports: from acme import specs
  from acme.agents.jax import bc
  from acme.agents.jax import sac
  from acme.jax import networks
  from acme.jax import utils
  from acme.testing import fakes
  import haiku
  import jax
  import numpy
  from absl.testing import absltest
label_desc: Use image node_id 1 for calling a global function with example usage: make_networks(spec) and returns: bc, jax