code: def transmissions(self, direction="outgoing", status="all", failed=False):
          
          # check parameters
          if direction not in ["incoming", "outgoing", "all"]:
              raise(ValueError("You cannot get transmissions of direction {}."
                               .format(direction) +
                    "Type can only be incoming, outgoing or all."))
  
          if status not in ["all", "pending", "received"]:
              raise(ValueError("You cannot get transmission of status {}."
                               .format(status) +
                    "Status can only be pending, received or all"))
  
          if failed not in ["all", False, True]:
              raise ValueError("{} is not a valid transmission failed"
                               .format(failed))
  
          # get transmissions
          if direction == "all":
              if status == "all":
                  return Transmission.query\
                      .filter(and_(Transmission.failed == False,
                                   or_(Transmission.destination_id == self.id,
                                       Transmission.origin_id == self.id)))\
                      .all()
              else:
                  return Transmission.query\
                      .filter(and_(Transmission.failed == False,
                                   Transmission.status == status,
                                   or_(Transmission.destination_id == self.id,
                                       Transmission.origin_id == self.id)))\
                      .all()
          if direction == "incoming":
              if status == "all":
                  return Transmission.query\
                      .filter_by(failed=False, destination_id=self.id)\
                      .all()
              else:
                  return Transmission.query\
                      .filter(and_(Transmission.failed == False,
                                   Transmission.destination_id == self.id,
                                   Transmission.status == status))\
                      .all()
          if direction == "outgoing":
              if status == "all":
                  return Transmission.query\
                      .filter_by(failed=False, origin_id=self.id)\
                      .all()
              else:
                  return Transmission.query\
                      .filter(and_(Transmission.failed == False,
                                   Transmission.origin_id == self.id,
                                   Transmission.status == status))\
                      .all()
docs: Get transmissions sent to or from this node.
  
          Direction can be "all", "incoming" or "outgoing" (default).
          Status can be "all" (default), "pending", or "received".
          failed can be True, False or "all"