parameters: (cache_updates, objects_to_walk)
docstring: Recursively walk an object tree, applying cache updates wherever necessary
docstring_summary: Recursively walk an object tree, applying cache updates wherever necessary
docstring_tokens: Recursively walk an object tree applying cache updates wherever necessary
function: def apply_cache_updates(cache_updates, objects_to_walk):
      """Recursively walk an object tree, applying cache updates wherever necessary"""
  
      def f(data):
          if isinstance(data, list):
              for i in data: f(i)
          elif isinstance(data, dict):
              for k,v in data.items(): f(v)
          elif isinstance(data, LiveObjectProxy):
              update = cache_updates.get(data._spec["backend"], {})
              if data._spec["id"] in update:
                  data._spec["itemCache"] = update[data._spec["id"]]
  
      f(objects_to_walk)
function_tokens: def apply_cache_updates ( cache_updates , objects_to_walk ) : def f ( data ) : if isinstance ( data , list ) : for i in data : f ( i ) elif isinstance ( data , dict ) : for k , v in data . items ( ) : f ( v ) elif isinstance ( data , LiveObjectProxy ) : update = cache_updates . get ( data . _spec [ "backend" ] , { } ) if data . _spec [ "id" ] in update : data . _spec [ "itemCache" ] = update [ data . _spec [ "id" ] ] f ( objects_to_walk )