def crossing(current, desired):
    'Checks to see if an agent is crossing paths'
    (current_x, current_y) = current
    (desired_x, desired_y) = desired
    if (current_x != desired_x):
        assert (current_y == desired_y)
        return ('X', min(current_x, desired_x), current_y)
    assert (current_x == desired_x)
    return ('Y', current_x, min(current_y, desired_y))
Checks to see if an agent is crossing paths
def crossing(current, desired):
    
    (current_x, current_y) = current
    (desired_x, desired_y) = desired
    if (current_x != desired_x):
        assert (current_y == desired_y)
        return ('X', min(current_x, desired_x), current_y)
    assert (current_x == desired_x)
    return ('Y', current_x, min(current_y, desired_y))