<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def delete_stack(stack):
 """ Deletes a stack that was previously saved.load_stack :param caliendo.hooks.CallStack stack: The stack to delete. """

    global CACHE_
    key = "{0}.{1}".format(stack.module, stack.caller)
    if key in CACHE_['stacks']:
        del CACHE_['stacks'][key]
        write_out()