def relaxed_caveman_graph(l, k, p, seed=None):
    if not seed is None:
        random.seed(seed)
    G = nx.caveman_graph(l, k)
    nodes = list(G)
    G.name = "relaxed_caveman_graph (%s,%s,%s)" % (l, k, p)
    for (u, v) in G.edges():
        if random.random() < p:  # rewire the edge
            x = random.choice(nodes)
            if G.has_edge(u, x):
                continue
            G.remove_edge(u, v)
            G.add_edge(u, x)
    return G
returns the type and path to file for a capsule
dataset/ETHPy150Open networkx/networkx/networkx/generators/community.py/relaxed_caveman_graph--crossover with--dataset/ETHPy150Open sassoftware/conary/conary/build/recipe.py/Recipe._getCapsule