Loads the saved state of a CallStack and returns a whole instance given an instance with incomplete state.

    :param caliendo.hooks.CallStack stack: The stack to load

    :returns: A CallStack previously built in the context of a patch call.
    :rtype: caliendo.hooks.CallStack

def load_stack(stack):
    """
    Loads the saved state of a CallStack and returns a whole instance given an instance with incomplete state.

    :param caliendo.hooks.CallStack stack: The stack to load

    :returns: A CallStack previously built in the context of a patch call.
    :rtype: caliendo.hooks.CallStack

    """
    global CACHE_
    load_cache(True)
    key = "{0}.{1}".format(stack.module, stack.caller)
    if key in CACHE_['stacks']:
        return pickle.loads(CACHE_['stacks'][key])