<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def collect_consequences(self):
 """Recursively collect a set of _ReferenceKeys that would consequentially get dropped if this were dropped via :return Set[_ReferenceKey]: All the relations that would be dropped """

        consequences = {self.key()}
        for relation in self.referenced_by.values():
            consequences.update(relation.collect_consequences())
        return consequences