code: def testLowPriorityElementNotFrequentlySampled(self):
      memory = self.create_default_memory()
      # Add an item and set its priority to 0.
      self.add_blank(memory, terminal=0, priority=0.0)
      # Now add a few new items.
      for _ in range(3):
          self.add_blank(memory, terminal=1)
      # This test should always pass.
      for _ in range(100):
          batch = memory.sample_transition_batch(batch_size=2)
          # Ensure all terminals are set to 1.
          self.assertTrue((batch.terminal == 1).all())
  
file_path: ReAgent/reagent/test/replay_memory/prioritized_replay_buffer_test.py
imports: import unittest
  import numpy
  from reagent.replay_memory import prioritized_replay_buffer
label_desc: Use image node_id 8 for calling the PrioritizedReplayBufferTest obj's underlying member method code with example usage: obj.testLowPriorityElementNotFrequentlySampled() without return types