docstr: Test this the buffer with different underlying buffers.
  
  Test if we can initialize a more complex underlying buffer with
  additional arguments and independent sampling.
  This does not test updating priorities and using weights as
  implemented in MultiAgentPrioritizedReplayBuffer.
docstr_tok: ["Test","this","the","buffer","with","different","underlying","buffers",".","Test","if","we","can","initialize","a","more","complex","underlying","buffer","with","additional","arguments","and","independent","sampling",".","This","does","not","test","updating","priorities","and","using","weights","as","implemented","in","MultiAgentPrioritizedReplayBuffer","."]
code: def test_independent_with_underlying_prioritized_replay_buffer(self):
      """Test this the buffer with different underlying buffers.
  
      Test if we can initialize a more complex underlying buffer with
      additional arguments and independent sampling.
      This does not test updating priorities and using weights as
      implemented in MultiAgentPrioritizedReplayBuffer.
      """
      # Test with PrioritizedReplayBuffer, args for c'tor, add and sample
      prioritized_replay_buffer_config = {
          "type": PrioritizedReplayBuffer,
          "alpha": 0.6,
          "beta": 0.4,
      }
  
      num_policies = 2
      buffer_size = 15
      num_batches = 1
  
      buffer = MultiAgentReplayBuffer(
          capacity=buffer_size,
          replay_mode="independent",
          num_shards=1,
          underlying_buffer_config=prioritized_replay_buffer_config,
      )
  
      self._add_multi_agent_batch_to_buffer(
          buffer, num_policies=num_policies, num_batches=num_batches
      )
  
      # Only test if we can sample from multiple policies
      sample = buffer.sample(2)
      assert len(sample) == 4
      assert len(sample.policy_batches) == 2
  
file_path: ray/rllib/utils/replay_buffers/tests/test_multi_agent_replay_buffer.py
imports: import unittest
  import numpy
  from ray.rllib.policy.sample_batch import SampleBatch, MultiAgentBatch, concat_samples
  from ray.rllib.policy.sample_batch import DEFAULT_POLICY_ID
  from ray.rllib.utils.replay_buffers.multi_agent_replay_buffer import MultiAgentReplayBuffer
  from ray.rllib.utils.replay_buffers.prioritized_replay_buffer import PrioritizedReplayBuffer
  from ray.rllib.utils.replay_buffers.replay_buffer import ReplayBuffer
label_desc: Use image node_id 8 for calling the TestMultiAgentReplayBuffer obj's underlying member method code with example usage: obj.test_independent_with_underlying_prioritized_replay_buffer() without return types