class_docstr: This is the proportional sampling variant of the prioritized experience replay as described
  in https://arxiv.org/pdf/1511.05952.pdf.
docstr: Clean the memory by removing all the episodes
  :return: None
docstr_tok: ["Clean","the","memory","by","removing","all","the","episodes",":","return",":","None"]
code: def clean(self, lock=True) -> None:
      """
      Clean the memory by removing all the episodes
      :return: None
      """
      if lock:
          self.reader_writer_lock.lock_writing_and_reading()
  
      super().clean(lock=False)
      self.sum_tree = SegmentTree(
          self.power_of_2_size, SegmentTree.Operation.SUM
      )
      self.min_tree = SegmentTree(
          self.power_of_2_size, SegmentTree.Operation.MIN
      )
      self.max_tree = SegmentTree(
          self.power_of_2_size, SegmentTree.Operation.MAX
      )
  
      if lock:
          self.reader_writer_lock.release_writing_and_reading()
  
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 6 for calling the PrioritizedExperienceReplay obj's underlying member method code with example usage: obj.clean(lock) without return types