def _retrieve_storage(self, exp, storage):
        """
        Args:
            exp: a nested dict or list
                Only dict keys that end with `_hash` will be retrieved.
                The processed key will see `_hash` removed
            storage: chunk of storage sent with the exps
        """
        if isinstance(exp, list):
            for i, e in enumerate(exp):
                exp[i] = self._retrieve_storage(e, storage)

        elif isinstance(exp, dict):
            for key in list(exp.keys()):  # copy keys
                if key.endswith('_hash'):
                    new_key = key[:-len('_hash')]  # delete suffix
                    exp[new_key] = self._retrieve_storage(exp[key], storage)
                    del exp[key]
                else:
                    exp[key] = self._retrieve_storage(exp[key], storage)

        elif isinstance(exp, str):
            exphash = exp
            if exphash in self._weakref_map:
                return self._weakref_map[exphash]
            else:
                self._weakref_map[exphash] = storage[exphash]
                return storage[exphash]
        return exp

        Args:
            exp: a nested dict or list
                Only dict keys that end with `_hash` will be retrieved.
                The processed key will see `_hash` removed
            storage: chunk of storage sent with the exps
        
surreal/distributed/exp_collector.py