code: def benchmarkCacheHit50thKeyKnownSubtype(self):
      # If there are 50 keys and we get a key that has a subtype in cache and
      # the cache has observed the key before (to memorize the subtype).
  
      cache = function_cache.FunctionCache()
      args_per_call = 5
      num_total_checks = 50
  
      keys = []
      for i in range(num_total_checks - 1):
          args = []
          for j in range(args_per_call):
              args.append(array_ops.zeros([i, j]))
          keys.append(make_type(args))
  
      for key in keys:
          cache.add(MockFunction(key, "testing"))
      cache.add(
          MockFunction(
              make_single_param_type(MockSubtypeOf2(2)), "testing"
          ),
      )
      cache.lookup(make_single_param_type(MockSubtypeOf2(3)))
  
      iterations = 10000
      lookup_key = make_single_param_type(MockSubtypeOf2(2))
      subtyping_time = timeit.timeit(
          lambda: cache.lookup(lookup_key), number=iterations
      )
  
      self.report_benchmark(
          name="cache_hit_50th_f_type_known_subtype",
          iters=iterations,
          wall_time=subtyping_time,
          metrics=[
              {
                  "name": "cache_hit_50th_f_type_known_subtype_avg_ms",
                  "value": subtyping_time / iterations * 1000,
              }
          ],
      )
  
imports: import dataclasses
  import itertools
  import timeit
  from typing import Any, Optional
  from tensorflow.core.function import trace_type
  from tensorflow.core.function.polymorphism import function_cache
  from tensorflow.core.function.polymorphism import function_type
  from tensorflow.python.ops import array_ops
  from tensorflow.python.platform import test
  from tensorflow.python.types import trace
label_desc: Use image node_id 3 for calling the FunctionCacheBenchmark obj's underlying member method code with example usage: obj.benchmarkCacheHit50thKeyKnownSubtype() without return types