class_docstr: AIL Builder.
class_docstr_tok: ["AIL","Builder","."]
code: def make_adder(
      self,
      replay_client: reverb.Client,
      environment_spec: Optional[specs.EnvironmentSpec],
      policy: Optional[DirectPolicyNetwork],
  ) -> Optional[adders.Adder]:
      direct_rl_adder = self._rl_agent.make_adder(
          replay_client, environment_spec, policy
      )
      if self._config.share_iterator:
          return direct_rl_adder
      ail_adder = adders_reverb.NStepTransitionAdder(
          priority_fns={self._config.replay_table_name: None},
          client=replay_client,
          n_step=1,
          discount=self._config.discount,
      )
  
      # Some direct rl algorithms (such as PPO), might be passing extra data
      # which we won't be able to process here properly, so we need to ignore them
      return adders.ForkingAdder(
          [adders.IgnoreExtrasAdder(ail_adder), direct_rl_adder]
      )
  
imports: import functools
  import itertools
  from typing import Callable, Generic, Iterator, List, Optional, Tuple
  from acme import adders
  from acme import core
  from acme import specs
  from acme import types
  from acme.adders import reverb
  from acme.agents.jax import builders
  from acme.agents.jax.ail import config
  from acme.agents.jax.ail import learning
  from acme.agents.jax.ail import losses
  from acme.agents.jax.ail import networks
  from acme.datasets import reverb
  from acme.jax import types
  from acme.jax import utils
  from acme.jax.imitation_learning_types import DirectPolicyNetwork
  from acme.utils import counting
  from acme.utils import loggers
  from acme.utils import reverb_utils
  import jax
  import numpy
  import optax
  import reverb
  from reverb import rate_limiters
  import tree
label_desc: Use image node_id 5 for calling the AILBuilder obj's underlying member method code with example usage: obj.make_adder(replay_client, environment_spec, policy) and returns: adders, direct_rl_adder