from typing import Any


def _check_option(name: str, value: Any) -> bool:
    """Check that the value is valid for the option with the given name.

    Args:
        name (str): Option name
        value: Option value

    Returns:
        True if ``value`` is a valid value for option ``name``, False
        otherwise.

    Raises:
        ValueError: Unknown option name.
    """
    if name == 'model_print_depth':
        if value is None:
            return True
        return isinstance(value, int) and value > 0
    elif name == 'train_summarizer_ma_length':
        return isinstance(value, int) and value > 0
    elif name == 'show_progress_bar':
        return isinstance(value, bool)
    else:
        raise ValueError("Unknown option name {}".format(repr(name)))