<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def warn_with_traceback(message, category, filename, lineno, file=None, line=None):
 """Get full tracebacks when warning is raised by setting warnings.showwarning = warn_with_traceback See also -------- http://stackoverflow.com/questions/22373927/get-traceback-of-warnings """

    import traceback
    traceback.print_stack()
    log = file if hasattr(file, 'write') else sys.stderr
    settings.write(warnings.formatwarning(message, category, filename, lineno, line))