class_docstr: Tests insertion and (weighted) sampling of the PrioritizedReplayBuffer.
class_docstr_tok: ["Tests","insertion","and","(","weighted",")","sampling","of","the","PrioritizedReplayBuffer","."]
code: def _generate_data(self):
      return SampleBatch(
          {
              SampleBatch.T: [np.random.random((4,))],
              SampleBatch.ACTIONS: [np.random.choice([0, 1])],
              SampleBatch.REWARDS: [np.random.rand()],
              SampleBatch.OBS: [np.random.random((4,))],
              SampleBatch.NEXT_OBS: [np.random.random((4,))],
              SampleBatch.TERMINATEDS: [
                  np.random.choice([False, True])
              ],
              SampleBatch.TRUNCATEDS: [
                  np.random.choice([False, False])
              ],
          }
      )
  
file_path: ray/python/ray/rllib/utils/replay_buffers/tests/test_prioritized_replay_buffer_replay_buffer_api.py
imports: from collections import Counter
  import numpy
  import unittest
  from ray.rllib.utils.replay_buffers.prioritized_replay_buffer import PrioritizedReplayBuffer
  from ray.rllib.policy.sample_batch import SampleBatch, MultiAgentBatch, concat_samples
  from ray.rllib.utils.test_utils import check
label_desc: Use image node_id 1 for calling the TestPrioritizedReplayBuffer obj's underlying member method code with example usage: obj._generate_data() and returns: SampleBatch