def interfaces(node, herited=True, handler_func=_iface_hdlr):
<EOL>try:<EOL><INDENT>implements = bases.Instance(node).getattr("<STR_LIT>")[<NUM_LIT:0>]<EOL><DEDENT>except exceptions.NotFoundError:<EOL><INDENT>return<EOL><DEDENT>if not herited and implements.frame() is not node:<EOL><INDENT>return<EOL><DEDENT>found = set()<EOL>missing = False<EOL>for iface in node_classes.unpack_infer(implements):<EOL><INDENT>if iface is astroid.Uninferable:<EOL><INDENT>missing = True<EOL>continue<EOL><DEDENT>if iface not in found and handler_func(iface):<EOL><INDENT>found.add(iface)<EOL>yield iface<EOL><DEDENT><DEDENT>if missing:<EOL><INDENT>raise exceptions.InferenceError()<EOL><DEDENT>
Return an iterator on interfaces implemented by the given class node.