<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def add_relationship(self, txn_id, predecessors):
 """Add a predecessor-successor relationship between one txn id and a set of predecessors. Args: txn_id (str):
 The transaction id of the transaction. predecessors (set):
 The transaction ids of the transaction's predecessors Returns: None """


        all_pred = set(predecessors)
        for pred in predecessors:
            all_pred.update(self._predecessors_by_id[pred])

        self._predecessors_by_id[txn_id] = all_pred