code: def _add_to_cache(obj, name, val, *args, kwargs_pkl):
      """Add a result to the cache of an object (honoring calling args)."""
      if not hasattr(obj, "_memoize_cache"):
          obj._memoize_cache = {}
      obj._memoize_cache[(name, args, kwargs_pkl)] = val
      return val
  
file_path: gpytorch/gpytorch/utils/memoize.py
imports: import functools
  import pickle
  from .errors import CachingError
label_desc: Use image node_id 9 for calling a global function with example usage: _add_to_cache(obj, name, val) and returns: val