import random


def choose_random_edge(g):
    """Chooses a random edge, as defined by a pair of nodes."""
    randKey1 = random.choice(list(g.keys()))
    randKey2 = random.choice(g[randKey1])
    return randKey1, randKey2