def decorated_with(func: astroid.FunctionDef, qnames: Iterable[str]) -> bool:
decorators = func.decorators.nodes if func.decorators else []<EOL>for decorator_node in decorators:<EOL><INDENT>try:<EOL><INDENT>if any(<EOL>i is not None and i.qname() in qnames for i in decorator_node.infer()<EOL>):<EOL><INDENT>return True<EOL><DEDENT><DEDENT>except astroid.InferenceError:<EOL><INDENT>continue<EOL><DEDENT><DEDENT>return False<EOL>
Determine if the `func` node has a decorator with the qualified name `qname`.