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: Returns a dict of policy IDs and batches, depending on our replay mode.
  
  This method helps with splitting up MultiAgentBatches only if the
  self.replay_mode requires it.
docstr_tok: ["Returns","a","dict","of","policy","IDs","and","batches",",","depending","on","our","replay","mode",".","This","method","helps","with","splitting","up","MultiAgentBatches","only","if","the","self.replay_mode","requires","it","."]
code: def _maybe_split_into_policy_batches(self, batch: SampleBatchType):
      """Returns a dict of policy IDs and batches, depending on our replay mode.
  
      This method helps with splitting up MultiAgentBatches only if the
      self.replay_mode requires it.
      """
      if self.replay_mode == ReplayMode.LOCKSTEP:
          return {_ALL_POLICIES: batch}
      else:
          return batch.policy_batches
  
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 10 for calling the MultiAgentReplayBuffer obj's underlying member method code with example usage: obj._maybe_split_into_policy_batches(batch) and returns: dict, batch