class_docstr: An `EventMultiplexer` manages access to multiple `EventAccumulator`s.
  
  Each `EventAccumulator` is associated with a `run`, which is a self-contained
  TensorFlow execution. The `EventMultiplexer` provides methods for extracting
  information about events from multiple `run`s.
  
  Example usage for loading specific runs from files:
  
  ```python
  x = EventMultiplexer({'run1': 'path/to/run1', 'run2': 'path/to/run2'})
  x.Reload()
  ```
  
  Example usage for loading a directory where each subdirectory is a run
  
  ```python
  (eg:) /parent/directory/path/
        /parent/directory/path/run1/
        /parent/directory/path/run1/events.out.tfevents.1001
        /parent/directory/path/run1/events.out.tfevents.1002
  
        /parent/directory/path/run2/
        /parent/directory/path/run2/events.out.tfevents.9232
  
        /parent/directory/path/run3/
        /parent/directory/path/run3/events.out.tfevents.9232
  x = EventMultiplexer().AddRunsFromDirectory('/parent/directory/path')
  (which is equivalent to:)
  x = EventMultiplexer({'run1': '/parent/directory/path/run1', 'run2':...}
  ```
  
  If you would like to watch `/parent/directory/path`, wait for it to be created
    (if necessary) and then periodically pick up new runs, use
    `AutoloadingMultiplexer`
  @@Tensors
docstr: Call `Reload` on every `EventAccumulator`.
docstr_tok: ["Call","`","Reload","`","on","every","`","EventAccumulator","`","."]
code: def Reload(self):
      """Call `Reload` on every `EventAccumulator`."""
      logger.info("Beginning EventMultiplexer.Reload()")
      self._reload_called = True
      # Build a list so we're safe even if the list of accumulators is modified
      # even while we're reloading.
      with self._accumulators_mutex:
          items = list(self._accumulators.items())
      items_queue = queue.Queue()
      for item in items:
          items_queue.put(item)
  
      # Methods of built-in python containers are thread-safe so long as the GIL
      # for the thread exists, but we might as well be careful.
      names_to_delete = set()
      names_to_delete_mutex = threading.Lock()
  
      def Worker():
          """Keeps reloading accumulators til none are left."""
          while True:
              try:
                  name, accumulator = items_queue.get(block=False)
              except queue.Empty:
                  # No more runs to reload.
                  break
  
              try:
                  accumulator.Reload()
              except (OSError, IOError) as e:
                  logger.error(
                      "Unable to reload accumulator %r: %s", name, e
                  )
              except directory_watcher.DirectoryDeletedError:
                  with names_to_delete_mutex:
                      names_to_delete.add(name)
              finally:
                  items_queue.task_done()
  
      if self._max_reload_threads > 1:
          num_threads = min(self._max_reload_threads, len(items))
          logger.info("Starting %d threads to reload runs", num_threads)
          for i in range(num_threads):
              thread = threading.Thread(
                  target=Worker, name="Reloader %d" % i
              )
              thread.daemon = True
              thread.start()
          items_queue.join()
      else:
          logger.info(
              "Reloading runs serially (one after another) on the main "
              "thread."
          )
          Worker()
  
      with self._accumulators_mutex:
          for name in names_to_delete:
              logger.warning("Deleting accumulator %r", name)
              del self._accumulators[name]
      logger.info("Finished with EventMultiplexer.Reload()")
      return self
  
imports: import os
  import queue
  import threading
  from typing import Optional
  from tensorboard.backend.event_processing import directory_watcher
  from tensorboard.backend.event_processing import plugin_event_accumulator
  from tensorboard.backend.event_processing import io_wrapper
  from tensorboard.util import tb_logging
label_desc: Use image node_id 4 for calling the EventMultiplexer obj's underlying member method code with example usage: obj.Reload() and returns: self