code: def test_code_object_cache(self):
      def factory(x):
          def test_fn():
              return x + 1
  
          return test_fn
  
      c = cache.CodeObjectCache()
  
      f1 = factory(1)
      dummy = object()
  
      c[f1][1] = dummy
  
      self.assertTrue(c.has(f1, 1))
      self.assertFalse(c.has(f1, 2))
      self.assertIs(c[f1][1], dummy)
      self.assertEqual(len(c), 1)
  
      f2 = factory(2)
  
      self.assertTrue(c.has(f2, 1))
      self.assertIs(c[f2][1], dummy)
      self.assertEqual(len(c), 1)
  
imports: from tensorflow.python.autograph.pyct import cache
  from tensorflow.python.platform import test
label_desc: Use image node_id 1 for calling the CacheTest obj's underlying member method code with example usage: obj.test_code_object_cache() and returns: test_fn, unknown