<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def portals(self):
 """Iterate over all portals."""

        char = self.character
        make_edge = self.engine._get_edge
        for (o, d) in self.engine._edges_cache.iter_keys(
                self.character.name, *self.engine._btt()
        ):
            yield make_edge(char, o, d)