<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def all_ports(self):
 """Return all Ports referenced by this Compound and its successors Returns ------- list of mb.Compound A list of all Ports referenced by this Compound and its successors """

        from mbuild.port import Port
        return [successor for successor in self.successors()
                if isinstance(successor, Port)]