class_docstr: Program definition for SVG0.
docstr: Build the distributed agent topology.
docstr_tok: ["Build","the","distributed","agent","topology","."]
code: def build(self, name="svg0"):
      """Build the distributed agent topology."""
      program = lp.Program(name=name)
  
      with program.group("replay"):
          replay = program.add_node(lp.ReverbNode(self.replay))
  
      with program.group("counter"):
          counter = program.add_node(lp.CourierNode(self.counter))
  
      if self._max_actor_steps:
          with program.group("coordinator"):
              _ = program.add_node(
                  lp.CourierNode(self.coordinator, counter)
              )
  
      with program.group("learner"):
          learner = program.add_node(
              lp.CourierNode(self.learner, replay, counter)
          )
  
      with program.group("evaluator"):
          program.add_node(
              lp.CourierNode(self.evaluator, learner, counter)
          )
  
      if not self._num_caches:
          # Use our learner as a single variable source.
          sources = [learner]
      else:
          with program.group("cacher"):
              # Create a set of learner caches.
              sources = []
              for _ in range(self._num_caches):
                  cacher = program.add_node(
                      lp.CacherNode(
                          learner,
                          refresh_interval_ms=2000,
                          stale_after_ms=4000,
                      )
                  )
                  sources.append(cacher)
  
      with program.group("actor"):
          # Add actors which pull round-robin from our variable sources.
          for actor_id in range(self._num_actors):
              source = sources[actor_id % len(sources)]
              program.add_node(
                  lp.CourierNode(self.actor, replay, source, counter)
              )
  
      return program
  
imports: import copy
  from typing import Callable, Dict, Optional
  import acme
  from acme import specs
  from acme.agents.tf.svg0_prior import agent
  from acme.tf import savers
  from acme.utils import counting
  from acme.utils import loggers
  from acme.utils import lp_utils
  import dm_env
  import launchpad
  import reverb
  import sonnet
label_desc: Use image node_id 8 for calling the DistributedSVG0 obj's underlying member method code with example usage: obj.build(name) and returns: program