def test_hook(from_idx, to_idx, distance):
    assert ((from_idx, to_idx) in [(3, 0), (4, 1), (5, 2), (1, 0)])
def test_hook(from_idx, to_idx, distance):
    assert ((from_idx, to_idx) in [(3, 0), (4, 1), (5, 2), (1, 0)])