def _validate_format(self, format, kwargs):
kwargs = kwargs.copy()<EOL>try:<EOL><INDENT>kwargs['<STR_LIT>'] = _FORMAT_MAP[format.lower()]<EOL><DEDENT>except KeyError:<EOL><INDENT>raise TypeError("<STR_LIT>"<EOL>.format(format))<EOL><DEDENT>return kwargs<EOL>
validate / deprecate formats; return the new kwargs