def _instance_callable(obj):
if not isinstance(obj, ClassTypes):<EOL><INDENT>return getattr(obj, '<STR_LIT>', None) is not None<EOL><DEDENT>klass = obj<EOL>if klass.__dict__.get('<STR_LIT>') is not None:<EOL><INDENT>return True<EOL><DEDENT>for base in klass.__bases__:<EOL><INDENT>if _instance_callable(base):<EOL><INDENT>return True<EOL><DEDENT><DEDENT>return False<EOL>
Given an object, return True if the object is callable.
    For classes, return True if instances would be callable.