class_docstr: A replay buffer shard for multiagent setups.
  
  This buffer is meant to be run in parallel to distribute experiences
  across `num_shards` shards. Unlike simpler buffers, it holds a set of
  buffers - one for each policy ID.
docstr: Adds a batch to the appropriate policy's replay buffer.
  
  Turns the batch into a MultiAgentBatch of the DEFAULT_POLICY_ID if
  it is not a MultiAgentBatch. Subsequently, adds the individual policy
  batches to the storage.
  
  Args:
      batch : The batch to be added.
      ``**kwargs``: Forward compatibility kwargs.
docstr_tok: ["Adds","a","batch","to","the","appropriate","policy","'s","replay","buffer",".","Turns","the","batch","into","a","MultiAgentBatch","of","the","DEFAULT_POLICY_ID","if","it","is","not","a","MultiAgentBatch",".","Subsequently",",","adds","the","individual","policy","batches","to","the","storage",".","Args",":","batch",":","The","batch","to","be","added",".","``","*","*","kwargs","``",":","Forward","compatibility","kwargs","."]
code: def add(self, batch: SampleBatchType, **kwargs) -> None:
      """Adds a batch to the appropriate policy's replay buffer.
  
      Turns the batch into a MultiAgentBatch of the DEFAULT_POLICY_ID if
      it is not a MultiAgentBatch. Subsequently, adds the individual policy
      batches to the storage.
  
      Args:
          batch : The batch to be added.
          ``**kwargs``: Forward compatibility kwargs.
      """
      if batch is None:
          if log_once("empty_batch_added_to_buffer"):
              logger.info(
                  "A batch that is `None` was added to {}. This can be "
                  "normal at the beginning of execution but might "
                  "indicate an issue.".format(type(self).__name__)
              )
          return
      # Make a copy so the replay buffer doesn't pin plasma memory.
      batch = batch.copy()
      # Handle everything as if multi-agent.
      batch = batch.as_multi_agent()
  
      with self.add_batch_timer:
          pids_and_batches = self._maybe_split_into_policy_batches(
              batch
          )
          for policy_id, sample_batch in pids_and_batches.items():
              self._add_to_underlying_buffer(
                  policy_id, sample_batch, **kwargs
              )
  
      self._num_added += batch.count
  
imports: import collections
  import logging
  from enum import Enum
  from typing import Any, Dict, Optional
  from ray.util.timer import _Timer
  from ray.rllib.policy.rnn_sequencing import timeslice_along_seq_lens_with_overlap
  from ray.rllib.policy.sample_batch import MultiAgentBatch, SampleBatch
  from ray.rllib.utils.annotations import override
  from ray.rllib.utils.deprecation import Deprecated
  from ray.rllib.utils.from_config import from_config
  from ray.rllib.utils.replay_buffers.replay_buffer import _ALL_POLICIES, ReplayBuffer, StorageUnit
  from ray.rllib.utils.typing import PolicyID, SampleBatchType
  from ray.util.annotations import DeveloperAPI
  from ray.util.debug import log_once
label_desc: Use image node_id 4 for calling the MultiAgentReplayBuffer obj's underlying member method code with example usage: obj.add(batch) without return types