def METHOD_NAME(printout, stack):
    """
    Pretty print the stack trace and environment information
    for debugging those hard to reproduce user problems.  :)
    """
    printout.write("======== Salt Debug Stack Trace =========\n")
    traceback.print_stack(stack, file=printout)
    printout.write("=========================================\n")