def highlight(
    row: pd.Series,
    selected_feedback: str,
    feedback_directions: Dict[str, bool],
    default_direction: str,
) -> List[str]:
    """
    Apply background color to the rows of a DataFrame based on the selected feedback.

    Args:
        row (pandas.Series): A row of the DataFrame to be highlighted.
        selected_feedback (str): The selected feedback to determine the background color.
        feedback_directions (dict): A dictionary mapping feedback names to their directions.
        default_direction (str): The default direction for feedback.

    Returns:
        list: A list of CSS styles representing the background color for each cell in the row.
    """
    if "distance" in selected_feedback:
        return [f"background-color: {CATEGORY.DISTANCE.color}"] * len(row)

    cat = CATEGORY.of_score(
        row["score"],
        higher_is_better=feedback_directions.get(
            selected_feedback, default_direction == "HIGHER_IS_BETTER"
        ),
    )
    # Apply the background color to the entire row
    return [f"background-color: {cat.color}"] * len(row)

    Apply background color to the rows of a DataFrame based on the selected feedback.

    Args:
        row (pandas.Series): A row of the DataFrame to be highlighted.
        selected_feedback (str): The selected feedback to determine the background color.
        feedback_directions (dict): A dictionary mapping feedback names to their directions.
        default_direction (str): The default direction for feedback.

    Returns:
        list: A list of CSS styles representing the background color for each cell in the row.
    
src/dashboard/trulens/dashboard/display.py