<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _get_edge_dict(self):
 """Return a dict of edges. Keyed tuples of (i, source, target, polarity) """

        edge_dict = collections.defaultdict(lambda: [])
        if len(self._edges) > 0:
            for e in self._edges:
                data = e['data']
                key = tuple([data['i'], data['source'],
                            data['target'], data['polarity']])
                edge_dict[key] = data['id']
        return edge_dict