<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def format_failure(failure):
 """Format how an error or warning should be displayed."""

    return "Line {}, Column {} - #{}: {} - Category: {}, Severity: {}".format(
        failure.getLine(),
        failure.getColumn(),
        failure.getErrorId(),
        failure.getMessage(),
        failure.getCategoryAsString(),
        failure.getSeverity()
    )