docstr: Sample data along with their corresponding probabilities.
  
  Args:
      n (int): Number of data to sample.
      uniform_ratio (float): Ratio of uniformly sampled data.
  Returns:
      sampled data (list)
      probabitilies (list)
docstr_tok: ["Sample","data","along","with","their","corresponding","probabilities",".","Args",":","n","(","int",")",":","Number","of","data","to","sample",".","uniform_ratio","(","float",")",":","Ratio","of","uniformly","sampled","data",".","Returns",":","sampled","data","(","list",")","probabitilies","(","list",")"]
code: def sample(
      self, n: int, uniform_ratio: float = 0
  ) -> Tuple[List[T], List[float], float]:
      """Sample data along with their corresponding probabilities.
  
      Args:
          n (int): Number of data to sample.
          uniform_ratio (float): Ratio of uniformly sampled data.
      Returns:
          sampled data (list)
          probabitilies (list)
      """
      assert (
          not self.wait_priority_after_sampling
          or not self.flag_wait_priority
      )
      (
          indices,
          probabilities,
          min_prob,
      ) = self._sample_indices_and_probabilities(
          n, uniform_ratio=uniform_ratio
      )
      sampled = [self.data[i] for i in indices]
      self.sampled_indices = indices
      self.flag_wait_priority = True
      return sampled, probabilities, min_prob
  
imports: import collections
  from typing import Any, Callable, Deque, Generic, List, Optional, Sequence, Tuple, TypeVar
  import numpy
  from pfrl.utils.random import sample_n_k
label_desc: Use image node_id 6 for calling the PrioritizedBuffer obj's underlying member method code with example usage: obj.sample(n, uniform_ratio) and returns: sampled,  probabilities,  min_prob