def build_edge(el, serial):
    e_id, e_name, e_src, e_tgt = 'e%d' % serial, None, None, None

    for key, value in el:
        if key == 'label':
            e_name = value
        elif key == 'source':
            e_src = str(value)
        elif key == 'target':
            e_tgt = str(value)

    return (e_id, e_name, e_src, e_tgt)
dataset/ETHPy150Open spotify/python-graphwalker/graphwalker/gml.py/build_edge/original