def error(code, **kwargs):
return (code, ERROR_MSGS[code].format(**kwargs))<EOL>
Return a tuple with the error code and the message with variables replaced.

This is syntactic sugar so instead of:
- `('EX02', ERROR_MSGS['EX02'].format(doctest_log=log))`

We can simply use:
- `error('EX02', doctest_log=log)`

Parameters
----------
code : str
    Error code.
**kwargs
    Values for the variables in the error messages

Returns
-------
code : str
    Error code.
message : str
    Error message with varaibles replaced.