from typing import Sequence


def chg_modelqa(models: Sequence, ordinal: int, **kwargs) -> int:
    """
    Information on the quality of the curve fit the intercept the ordinal date.

    Args:
        models: sorted sequence of CCDC namedtuples that represent the pixel history
        ordinal: standard python ordinal starting on day 1 of year 1

    Returns:
        curve_qa or 0

    """
    if ordinal <= 0 or not models:
        return 0

    for m in models:
        if m.start_day <= ordinal <= m.end_day:
            return m.curve_qa

    return 0