def _get_edges_elist(line, attributes, separator, secondary, edges,
    di_attributes, di_convert):
    """
    Add edges and attributes to `edges` and `di_attributes` for the "neighbour"
    format.
    """
    data = line.split(separator)
    source, target = int(data[0]), int(data[1])
    edges.append((source, target))
    if len(data) == 3:
        attr_data = data[2].split(secondary)
        for name, val in zip(attributes, attr_data):
            di_attributes[name].append(di_convert[name](val))
