Given: [2000343, 32722, 1819]   Return: set([(2000343, 32722), (32722, 1819)]).

def path2edges(path):
    """Given: [2000343, 32722, 1819]   Return: set([(2000343, 32722), (32722, 1819)])."""
    node_a, node_b = tee(path)
    next(node_b, None)
    return zip(node_a, node_b)