def implements(obj, protocol):
if isinstance(obj, type):<EOL><INDENT>raise TypeError("<STR_LIT>"<EOL>"<STR_LIT>" % obj)<EOL><DEDENT>return isinstance(obj, protocol) or issubclass(AnyType, protocol)<EOL>
Does the object 'obj' implement the 'prococol'?