<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def edge_index(self):
 """A map to look up the index of a edge"""

        return dict((edge, index) for index, edge in enumerate(self.edges))