class_docstr: Builder for decentralized multiagent setup.
docstr: Returns multiagent learner set.
  
  Args:
    random_key: random key.
    networks: dict of networks, one per learner. Networks can be heterogeneous
      (i.e., distinct in architecture) across learners.
    dataset: list of iterators over samples from replay, one per learner.
    logger_fn: factory providing loggers used for logging progress.
    environment_spec: the (multiagent) environment spec, which will be
      factorized into single-agent specs for replay table initialization.
    replay_client: replay client that is shared amongst the sub-learners.
    counter: a Counter which allows for recording of counts (learner steps,
      actor steps, etc.) distributed throughout the agent.
docstr_tok: ["Returns","multiagent","learner","set",".","Args",":","random_key",":","random","key",".","networks",":","dict","of","networks",",","one","per","learner",".","Networks","can","be","heterogeneous","(","i.e.",",","distinct","in","architecture",")","across","learners",".","dataset",":","list","of","iterators","over","samples","from","replay",",","one","per","learner",".","logger_fn",":","factory","providing","loggers","used","for","logging","progress",".","environment_spec",":","the","(","multiagent",")","environment","spec",",","which","will","be","factorized","into","single-agent","specs","for","replay","table","initialization",".","replay_client",":","replay","client","that","is","shared","amongst","the","sub-learners",".","counter",":","a","Counter","which","allows","for","recording","of","counts","(","learner","steps",",","actor","steps",",","etc",".",")","distributed","throughout","the","agent","."]
code: def make_learner(
      self,
      random_key: networks_lib.PRNGKey,
      networks: ma_types.MultiAgentNetworks,
      dataset: Iterator[ma_types.MultiAgentSample],
      logger_fn: loggers.LoggerFactory,
      environment_spec: Optional[specs.EnvironmentSpec] = None,
      replay_client: Optional[reverb.Client] = None,
      counter: Optional[counting.Counter] = None,
  ) -> learner_set.SynchronousDecentralizedLearnerSet:
      """Returns multiagent learner set.
  
      Args:
        random_key: random key.
        networks: dict of networks, one per learner. Networks can be heterogeneous
          (i.e., distinct in architecture) across learners.
        dataset: list of iterators over samples from replay, one per learner.
        logger_fn: factory providing loggers used for logging progress.
        environment_spec: the (multiagent) environment spec, which will be
          factorized into single-agent specs for replay table initialization.
        replay_client: replay client that is shared amongst the sub-learners.
        counter: a Counter which allows for recording of counts (learner steps,
          actor steps, etc.) distributed throughout the agent.
      """
      parent_counter = counter or counting.Counter()
      sub_learners = {}
      unzipped_dataset = iterator_utils.unzip_iterators(
          dataset, num_sub_iterators=self._num_agents
      )
  
      def make_logger_fn(agent_id: str) -> loggers.LoggerFactory:
          """Returns a logger factory for the subagent with the given id."""
  
          def logger_factory(
              label: loggers.LoggerLabel,
              steps_key: Optional[loggers.LoggerStepsKey] = None,
              instance: Optional[loggers.TaskInstance] = None,
          ) -> loggers.Logger:
              return logger_fn(
                  f"{label}{agent_id}", steps_key, instance
              )
  
          return logger_factory
  
      for i_dataset, (agent_id, builder) in enumerate(
          self._builders.items()
      ):
          counter = counting.Counter(
              parent_counter, prefix=f"{agent_id}"
          )
          single_agent_spec = ma_utils.get_agent_spec(
              environment_spec, agent_id
          )
          random_key, learner_key = jax.random.split(random_key)
          sub_learners[agent_id] = builder.make_learner(
              learner_key,
              networks[agent_id],
              unzipped_dataset[i_dataset],
              logger_fn=make_logger_fn(agent_id),
              environment_spec=single_agent_spec,
              replay_client=replay_client,
              counter=counter,
          )
      return learner_set.SynchronousDecentralizedLearnerSet(
          sub_learners, separator=VARIABLE_SEPARATOR
      )
  
imports: from typing import Dict, Iterator, List, Mapping, Optional, Sequence
  from acme import adders
  from acme import core
  from acme import specs
  from acme import types
  from acme.agents.jax import builders
  from acme.agents.jax.multiagent.decentralized import actor
  from acme.agents.jax.multiagent.decentralized import factories
  from acme.agents.jax.multiagent.decentralized import learner_set
  from acme.jax import networks
  from acme.multiagent import types
  from acme.multiagent import utils
  from acme.utils import counting
  from acme.utils import iterator_utils
  from acme.utils import loggers
  import jax
  import reverb
label_desc: Use image node_id 4 for calling the DecentralizedMultiAgentBuilder obj's underlying member method code with example usage: obj.make_learner(random_key, networks, dataset, logger_fn, environment_spec, replay_client, counter) and returns: learner_set, logger_factory, logger_fn