code: def memoize(f):
      memo = {}
  
      def helper(x, y):
          if (x, y) not in memo:
              memo[(x, y)] = f(x, y)
          return memo[(x, y)]
  
      return helper
  
file_path: coremltools/coremltools/converters/mil/mil/types/type_dict.py
imports: from .None import type_bool, type_int
  from .annotate import annotate
  from .get_type_info import get_type_info
  from .type_spec import Type
  from .type_void import void
label_desc: Use image node_id 1 for calling a global function with example usage: memoize(f) and returns: helper, memo