def _normalize_option_list(option_list: Any | list[Any], num_y_vals: int) -> list[Any]:
    """
    Normalize an option list to have the same length as the number of `y` values.
    """

    # If `option_list` is a single value, then make it a list
    if not isinstance(option_list, list):
        option_list = [option_list]

    if len(option_list) != 1 and len(option_list) != num_y_vals:
        raise ValueError("Every option must have either length 1 or `length(y_vals)`.")

    if len(option_list) == 1:
        option_list = [option_list[0]] * num_y_vals

    return option_list

    Normalize an option list to have the same length as the number of `y` values.
    
great_tables/_utils_nanoplots.py