Python 3.9 is now generally available.

google.appengine.api.mail.check_headers_valid

Checks that headers is a valid dictionary for a header.

headers The value to check for the headers.

InvalidEmailError If headers is invalid.