def is_consistent_type(theType, name, *constructionArgs):
assert theType.__name__ == name<EOL>assert isinstance(theType, type)<EOL>instance = theType(*constructionArgs)<EOL>assert type(instance) is theType<EOL>return True<EOL>
Perform various assertions about *theType* to ensure that it is a
well-defined type.  This is useful for extension types, where it's
pretty easy to do something wacky.  If something about the type is
unusual, an exception will be raised.

:param theType: The type object about which to make assertions.
:param name: A string giving the name of the type.
:param constructionArgs: Positional arguments to use with
    *theType* to create an instance of it.