def has_path(G, source, target):
    try:
        sp = nx.shortest_path(G, source, target)
    except nx.NetworkXNoPath:
        return False
    return True
"Test the login.
dataset/ETHPy150Open networkx/networkx/networkx/algorithms/shortest_paths/generic.py/has_path--crossover with--dataset/ETHPy150Open home-assistant/home-assistant/tests/components/camera/test_uvc.py/TestUVC.test_login