class_docstr: This buffer implements Prioritized Experience Replay.
  
  The algorithm has been described by Tom Schaul et. al. in "Prioritized
  Experience Replay". See https://arxiv.org/pdf/1511.05952.pdf for
  the full paper.
code: def _sample_proportional(self, num_items: int) -> List[int]:
      res = []
      for _ in range(num_items):
          # TODO(szymon): should we ensure no repeats?
          mass = random.random() * self._it_sum.sum(
              0, len(self._storage)
          )
          idx = self._it_sum.find_prefixsum_idx(mass)
          res.append(idx)
      return res
  
imports: import random
  from typing import Any, Dict, List, Optional
  import numpy
  import ray
  import psutil
  from ray.rllib.execution.segment_tree import SumSegmentTree, MinSegmentTree
  from ray.rllib.policy.sample_batch import SampleBatch
  from ray.rllib.utils.annotations import override
  from ray.rllib.utils.metrics.window_stat import WindowStat
  from ray.rllib.utils.replay_buffers.replay_buffer import ReplayBuffer
  from ray.rllib.utils.typing import SampleBatchType
  from ray.util.annotations import DeveloperAPI
label_desc: Use image node_id 3 for calling the PrioritizedReplayBuffer obj's underlying member method code with example usage: obj._sample_proportional(num_items) and returns: res