code: def memoize(f):
      memo = {}
  
      def helper(x):
          x = _global_tuple(x)
          if x not in memo:
              memo[x] = f(x)
          return memo[x]
  
      return helper
  
file_path: turicreate/src/external/coremltools_wrap/coremltools/coremltools/converters/mil/mil/types/type_tuple.py
imports: from __future__ import print_function
  from __future__ import division
  from __future__ import absolute_import
  from .annotate import annotate
  from .None import type_int
  from .None import type_unknown
  from .type_spec import Type
  from .get_type_info import get_type_info
label_desc: Use image node_id 1 for calling a global function with example usage: memoize(f) and returns: helper, memo