code: def infos(self, type=None, failed=False):
          
          if type is None:
              type = Info
  
          if not issubclass(type, Info):
              raise TypeError(
                  "Cannot get infos of type {} " "as it is not a valid type.".format(type)
              )
  
          if failed not in ["all", False, True]:
              raise ValueError("{} is not a valid vector failed".format(failed))
  
          if failed == "all":
              return type.query.filter_by(origin_id=self.id).all()
          else:
              return type.query.filter_by(origin_id=self.id, failed=failed).all()
docs: 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".