code: def test_capacity(self):
      capacity = self.capacity
      if capacity is None:
          return
  
      rbuf = replay_buffer.PrioritizedReplayBuffer(capacity)
      # Fill the buffer
      for _ in range(capacity):
          trans1 = dict(
              state=0,
              action=1,
              reward=2,
              next_state=3,
              next_action=4,
              is_state_terminal=True,
          )
          rbuf.append(**trans1)
      self.assertEqual(len(rbuf), capacity)
  
      # Add a new transition
      trans2 = dict(
          state=1,
          action=1,
          reward=2,
          next_state=3,
          next_action=4,
          is_state_terminal=True,
      )
      rbuf.append(**trans2)
      # The size should not change
      self.assertEqual(len(rbuf), capacity)
  
imports: import collections
  import copy
  import os
  import tempfile
  import unittest
  from chainer import testing
  import numpy
  from chainerrl import replay_buffer
label_desc: Use image node_id 3 for calling the TestPrioritizedReplayBuffer obj's underlying member method code with example usage: obj.test_capacity() without return types