code: def optimize_cache_key(
      context: "OptimizerContext", expr: FunctionExpression
  ):
      """Optimize the cache key
  
      It tries to reduce the caching overhead by replacing the caching key with
      logically equivalent key. For instance, frame data can be replaced with frame id.
  
      Args:
          expr (FunctionExpression): expression to optimize the caching key for.
  
      Example:
          Yolo(data) -> return id
  
      Todo: Optimize complex expression
          FaceDet(Crop(data, bbox)) -> return
  
      """
      keys = expr.children
  
      optimize_key_mapping_f = {
          TupleValueExpression: optimize_cache_key_for_tuple_value_expression,
          ConstantValueExpression: optimize_cache_key_for_constant_value_expression,
      }
  
      optimized_keys = []
      for key in keys:
          if type(key) not in optimize_key_mapping_f:
              raise RuntimeError(
                  f"Optimize cache key of {type(key)} is not implemented"
              )
          optimized_keys += optimize_key_mapping_f[type(key)](
              context, key
          )
  
      return optimized_keys
  
imports: import typing
  from typing import List, Tuple
  from evadb.catalog.catalog_utils import get_table_primary_columns
  from evadb.catalog.models.column_catalog import ColumnCatalogEntry
  from evadb.catalog.models.function_io_catalog import FunctionIOCatalogEntry
  from evadb.catalog.models.function_metadata_catalog import FunctionMetadataCatalogEntry
  from evadb.constants import CACHEABLE_FUNCTIONS, DEFAULT_FUNCTION_EXPRESSION_COST
  from evadb.expression.abstract_expression import AbstractExpression, ExpressionType
  from evadb.expression.constant_value_expression import ConstantValueExpression
  from evadb.expression.expression_utils import conjunction_list_to_expression_tree, contains_single_column, get_columns_in_predicate, is_simple_predicate, to_conjunction_list
  from evadb.expression.function_expression import FunctionExpression, FunctionExpressionCache
  from evadb.expression.tuple_value_expression import TupleValueExpression
  from evadb.parser.alias import Alias
  from evadb.parser.create_statement import ColumnDefinition
  from evadb.utils.kv_cache import DiskKVCache
label_desc: Use image node_id 8 for calling a global function with example usage: optimize_cache_key(context, expr) and returns: optimized_keys