def validate_row(row):
    """
        Helper function to validate a row read in from CSV.
        If validation fails, returns tuple of (False, error message).
        If validation succeeds, returns tuple of (True, (username, field_name, score))
    """

    if not isinstance(row, list):
        return (False, "Badly formatted row")

    if len(row) != 3:
        return  (False, "Too few or too many items in row (should be 3)")

    [username, field_name, score_str] = row
        
    if not isinstance(username, str):
        return (False, "Username is not a string")
            
    if not username:
        return (False, "Username is empty string")

    if not isinstance(field_name, str):
        return (False, "Field name is not a string")

    if not field_name:
        return (False, "Field name is empty string")

    try:
        score = float(score_str)
        if score > 10000 or score < -10000:
            return (False, "The score must be between -10000 and 10000")
    except ValueError:
        return (False, "Score cannot be converted to floating point")

    return (True, (username, field_name, score))