def get_saved_proxied_obj(self, stacked, request_id):
        # All state for the request identified by request_id
        reglist = self.saved_registry_states[request_id][1]

        # The top of the stack was current when the exception occurred
        stack_level = len(reglist) - 1
        stacked_id = id(stacked)
        while True:
            if stack_level < 0:
                # Nothing registered: Call _current_obj_orig to raise a
                # TypeError
                return stacked._current_obj_orig()
            context = reglist[stack_level]
            if stacked_id in context:
                break
            # This StackedObjectProxy may not have been registered by the
            # RegistryManager that was active when the exception was raised --
            # continue searching down the stack until it's found
            stack_level -= 1
        return context[stacked_id][1]
Retrieve the saved object proxied by the specified
dataset/ETHPy150Open cloudera/hue/desktop/core/ext-py/Paste-2.0.1/paste/registry.py/StackedObjectRestorer.get_saved_proxied_obj