def priority(s):
<EOL>type_of_s = type(s)<EOL>if type_of_s in (list, tuple, set, frozenset):<EOL><INDENT>return [ITERABLE]<EOL><DEDENT>if type_of_s is dict:<EOL><INDENT>return [DICT]<EOL><DEDENT>if issubclass(type_of_s, type):<EOL><INDENT>return [TYPE]<EOL><DEDENT>if hasattr(s, '<STR_LIT>'):<EOL><INDENT>p = [VALIDATOR]<EOL>if hasattr(s, "<STR_LIT>"):<EOL><INDENT>p.extend(priority(s._schema))<EOL><DEDENT>return p<EOL><DEDENT>if callable(s):<EOL><INDENT>return [CALLABLE]<EOL><DEDENT>else:<EOL><INDENT>return [COMPARABLE]<EOL><DEDENT>
Return priority for a given object.