def isa(cls, protocol):
if not isinstance(cls, type):<EOL><INDENT>raise TypeError("<STR_LIT>" %<EOL>repr(cls))<EOL><DEDENT>if not isinstance(protocol, type):<EOL><INDENT>raise TypeError(("<STR_LIT>"<EOL>"<STR_LIT>") % type(protocol))<EOL><DEDENT>return issubclass(cls, protocol) or issubclass(AnyType, protocol)<EOL>
Does the type 'cls' participate in the 'protocol'?