def has_rule_for_os(os_dict, os_name, os_version):
    """Return True if os dict has a rule for os name/version."""
    if 'any_os' in os_dict:
        return True
    if os_name in os_dict:
        version_dict = os_dict[os_name]
        return os_version in version_dict or 'any_version' in version_dict