code: def convert_to_bc_network(
      policy_network: networks_lib.FeedForwardNetwork,
  ) -> BCPolicyNetwork:
      """Converts a policy network from SAC/TD3/D4PG/.. into a BC policy network.
  
      Args:
        policy_network: FeedForwardNetwork taking the observation as input and
          returning action representation compatible with one of the BC losses.
  
      Returns:
        The BC policy network taking observation, is_training, key as input.
      """
  
      def apply(
          params: networks_lib.Params,
          observation: networks_lib.Observation,
          *args,
          is_training: bool = False,
          key: Optional[types.PRNGKey] = None,
          **kwargs,
      ) -> networks_lib.NetworkOutput:
          del is_training, key
          return policy_network.apply(
              params, observation, *args, **kwargs
          )
  
      return BCPolicyNetwork(policy_network.init, apply)
  
file_path: acme/acme/agents/jax/bc/networks.py
imports: import dataclasses
  from typing import Callable, Optional
  from acme.jax import networks
  from acme.jax import types
  from typing_extensions import Protocol
label_desc: Use image node_id 2 for calling a global function with example usage: convert_to_bc_network(policy_network) and returns: BCPolicyNetwork, policy_network