def METHOD_NAME(  # noqa: PLR0912
    entry: Custom,
    options: FavaOptions,
) -> None:
    """Parse a single custom fava-option entry and set option accordingly."""
    key = entry.values[0].value.replace("-", "_")
    if key not in All_OPTS:
        raise ValueError(f"unknown option `{key}`")
    if key == "default_file":
        options.default_file = entry.meta["filename"]
        return
    value = entry.values[1].value
    if not isinstance(value, str):
        raise TypeError(f"expected string value for option `{key}`")
    if key == "insert_entry":
        try:
            pattern = re.compile(value)
        except re.error as err:
            raise TypeError(
                f"Should be a regular expression: '{value}'.",
            ) from err
        opt = InsertEntryOption(
            entry.date,
            pattern,
            entry.meta["filename"],
            entry.meta["lineno"],
        )
        options.insert_entry.append(opt)
    elif key == "collapse_pattern":
        try:
            pattern = re.compile(value)
        except re.error as err:
            raise TypeError(
                f"Should be a regular expression: '{value}'.",
            ) from err
        options.collapse_pattern.append(pattern)
    elif key == "locale":
        try:
            Locale.parse(value)
            options.locale = value
        except UnknownLocaleError as err:
            raise ValueError(f"Unknown locale: '{value}'.") from err
    elif key == "fiscal_year_end":
        fye = parse_fye_string(value)
        if fye is None:
            raise ValueError("Invalid 'fiscal_year_end' option.")
        options.fiscal_year_end = fye
    elif key in STR_OPTS:
        setattr(options, key, value)
    elif key in BOOL_OPTS:
        setattr(options, key, value.lower() == "true")
    elif key in INT_OPTS:
        setattr(options, key, int(value))
    else:  # key in TUPLE_OPTS
        setattr(options, key, tuple(value.strip().split(" ")))