code: def testMostSpecificFunctionCacheKeyIsOrderAgnostic(self):
      ctx = function_cache.FunctionContext(0)
      keys = [
          (
              MockFunction(
                  make_single_param_type(MockShape(1, 1, 1)), "a"
              ),
              ctx,
          ),
          (
              MockFunction(
                  make_single_param_type(MockShape(1, None, 1)), "b"
              ),
              ctx,
          ),
          (
              MockFunction(
                  make_single_param_type(MockShape(None, None, 1)), "c"
              ),
              ctx,
          ),
          (
              MockFunction(
                  make_single_param_type(MockShape(None, None, None)),
                  "d",
              ),
              ctx,
          ),
      ]
  
      for permutation in itertools.permutations(keys):
          cache = function_cache.FunctionCache()
          cache.add(
              permutation[0][0],
              permutation[0][1],
          )
          cache.add(
              permutation[1][0],
              permutation[1][1],
          )
          cache.add(
              permutation[2][0],
              permutation[2][1],
          )
          cache.add(
              permutation[3][0],
              permutation[3][1],
          )
  
          self.assertEqual(
              cache.lookup(
                  make_single_param_type(MockShape(1, 1, 1)), ctx
              ).test_string,
              "a",
          )
          self.assertEqual(
              cache.lookup(
                  make_single_param_type(MockShape(1, 2, 1)), ctx
              ).test_string,
              "b",
          )
          self.assertEqual(
              cache.lookup(
                  make_single_param_type(MockShape(2, 2, 1)), ctx
              ).test_string,
              "c",
          )
          self.assertEqual(
              cache.lookup(
                  make_single_param_type(MockShape(2, 2, 2)), ctx
              ).test_string,
              "d",
          )
  
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 6 for calling the FunctionCacheTest obj's underlying member method code with example usage: obj.testMostSpecificFunctionCacheKeyIsOrderAgnostic() without return types