def _validate_path(path):
    """Sorts path values from largest to smallest.

    Will warn if path parameter was not already sorted.
    """
    if path is None:
        return None

    new_path = np.array(sorted(set(path), reverse=True))
    if new_path[0] != path[0]:
        print("Warning: Path must be sorted largest to smallest.")

    return new_path
def _validate_path ( path ) : if path is None : return None new_path = np . array ( sorted ( set ( path ) , reverse = True ) ) if new_path [ 0 ] != path [ 0 ] : print ( "Warning: Path must be sorted largest to smallest." ) return new_path
Sorts path values from largest to smallest.

    Will warn if path parameter was not already sorted.