class_docstr: This is the proportional sampling variant of the prioritized experience replay as described
  in https://arxiv.org/pdf/1511.05952.pdf.
docstr: Update the priority of a given transition, using its index in the tree and its error
  :param leaf_idx: the index of the transition leaf in the tree
  :param error: the new error value
  :return: None
docstr_tok: ["Update","the","priority","of","a","given","transition",",","using","its","index","in","the","tree","and","its","error",":","param","leaf_idx",":","the","index","of","the","transition","leaf","in","the","tree",":","param","error",":","the","new","error","value",":","return",":","None"]
code: def _update_priority(self, leaf_idx: int, error: float) -> None:
      """
      Update the priority of a given transition, using its index in the tree and its error
      :param leaf_idx: the index of the transition leaf in the tree
      :param error: the new error value
      :return: None
      """
      if error < 0:
          raise ValueError("The priorities must be non-negative values")
      priority = error + self.epsilon
      self.sum_tree.update(leaf_idx, priority**self.alpha)
      self.min_tree.update(leaf_idx, priority**self.alpha)
      self.max_tree.update(leaf_idx, priority)
      self.maximal_priority = self.max_tree.total_value()
  
imports: import operator
  import random
  from enum import Enum
  from typing import List, Tuple, Any
  import numpy
  from rl_coach.core_types import Transition
  from rl_coach.memories.memory import MemoryGranularity
  from rl_coach.memories.non_episodic.experience_replay import ExperienceReplayParameters, ExperienceReplay
  from rl_coach.schedules import Schedule, ConstantSchedule
label_desc: Use image node_id 2 for calling the PrioritizedExperienceReplay obj's underlying member method code with example usage: obj._update_priority(leaf_idx, error) without return types