class_docstr: Cache tests for bijectors that don't return new things.
code: def testCircularReferencesDontLeak(self):
      struct = self.test_arg()
  
      # Transform and add to cache.
      struct = self.forward(struct)
      self.assertLen(self.forward_keys, 1)
      self.assertLen(self.inverse_keys, 1)
  
      # Outputs are the same as inputs; nothing's been cleared or added.
      struct = self.inverse(struct)
      self.assertLen(self.forward_keys, 1)
      self.assertLen(self.inverse_keys, 1)
  
      # We haven't called inverse on the original yet!
      struct = self.inverse(struct)
      self.assertLen(self.forward_keys, 2)
      self.assertLen(self.inverse_keys, 2)
  
      # Cache is emptied without leaks.
      struct = None
      self.assertLen(self.forward_keys, 0)
      self.assertLen(self.inverse_keys, 0)
  
imports: from absl.testing import parameterized
  import tensorflow.compat.v2
  from tensorflow_probability.python.internal import cache_util
  from tensorflow_probability.python.internal import test_util
label_desc: Use image node_id 4 for calling the IdentityCacheTest obj's underlying member method code with example usage: obj.testCircularReferencesDontLeak() without return types