def format_error(self, error, args=None):
if type(args) is dict:<EOL><INDENT>return error.format(**args)<EOL><DEDENT>if type(args) is list or type(args) is tuple:<EOL><INDENT>return error.format(*args)<EOL><DEDENT>return error<EOL>
Format error with positional or named arguments (if any)