
    Given a matrix where each row contains risk assessment scores for a social media post across different harm categories, rearrange the posts in ascending order based on their total risk scores (sum of scores across all categories) to help moderators prioritize content review. Each row in the matrix represents a single post's analysis results, and each column represents a specific type of content violation score.
    

    
def sort_matrix(M):
    """
    Given a matrix where each row contains risk assessment scores for a social media post across different harm categories, rearrange the posts in ascending order based on their total risk scores (sum of scores across all categories) to help moderators prioritize content review. Each row in the matrix represents a single post's analysis results, and each column represents a specific type of content violation score.
    

    """
def sort_matrix(M):
    """
    Given a matrix where each row contains risk assessment scores for a social media post across different harm categories, rearrange the posts in ascending order based on their total risk scores (sum of scores across all categories) to help moderators prioritize content review. Each row in the matrix represents a single post's analysis results, and each column represents a specific type of content violation score.
    

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