def infos(self, type=None, failed=False):
if type is None:<EOL><INDENT>type = Info<EOL><DEDENT>if not issubclass(type, Info):<EOL><INDENT>raise TypeError(<EOL>"<STR_LIT>" "<STR_LIT>".format(type)<EOL>)<EOL><DEDENT>if failed not in ["<STR_LIT:all>", False, True]:<EOL><INDENT>raise ValueError("<STR_LIT>".format(failed))<EOL><DEDENT>if failed == "<STR_LIT:all>":<EOL><INDENT>return type.query.filter_by(origin_id=self.id).all()<EOL><DEDENT>else:<EOL><INDENT>return type.query.filter_by(origin_id=self.id, failed=failed).all()<EOL><DEDENT>
Get infos that originate from this node.

        Type must be a subclass of :class:`~dallinger.models.Info`, the default is
        ``Info``. Failed can be True, False or "all".