
    Given a fleet monitoring matrix where each row contains sensor readings for a vehicle and each column represents different maintenance metrics, rearrange the vehicles (rows) based on their total maintenance priority scores from lowest to highest. The maintenance priority score for each vehicle is calculated as the sum of all its sensor readings, and this sorting helps in establishing a clear maintenance schedule sequence for the fleet.
    

    
def sort_matrix(M):
    """
    Given a fleet monitoring matrix where each row contains sensor readings for a vehicle and each column represents different maintenance metrics, rearrange the vehicles (rows) based on their total maintenance priority scores from lowest to highest. The maintenance priority score for each vehicle is calculated as the sum of all its sensor readings, and this sorting helps in establishing a clear maintenance schedule sequence for the fleet.
    

    """
def sort_matrix(M):
    """
    Given a fleet monitoring matrix where each row contains sensor readings for a vehicle and each column represents different maintenance metrics, rearrange the vehicles (rows) based on their total maintenance priority scores from lowest to highest. The maintenance priority score for each vehicle is calculated as the sum of all its sensor readings, and this sorting helps in establishing a clear maintenance schedule sequence for the fleet.
    

    """
    result = sorted(M, key=sum)
    return result