def _shallow_validate_type_hint(node: Node, type_hint: Any) -> None:
    "Error if node's type, content and metadata are not compatible with type_hint."
    from omegaconf import DictConfig, ListConfig, ValueNode
    (is_optional, ref_type) = _resolve_optional(type_hint)
    vk = get_value_kind(node)
    if node._is_none():
        if (not is_optional):
            value = _get_value(node)
            raise ValidationError((f'Value {value!r} ({type(value).__name__})' + f" is incompatible with type hint '{ref_type.__name__}'"))
        return
    elif (vk in (ValueKind.MANDATORY_MISSING, ValueKind.INTERPOLATION)):
        return
    elif (vk == ValueKind.VALUE):
        if (is_primitive_type(ref_type) and isinstance(node, ValueNode)):
            value = node._value()
            if (not isinstance(value, ref_type)):
                raise ValidationError((f'Value {value!r} ({type(value).__name__})' + f" is incompatible with type hint '{ref_type.__name__}'"))
        elif (is_structured_config(ref_type) and isinstance(node, DictConfig)):
            return
        elif (is_dict_annotation(ref_type) and isinstance(node, DictConfig)):
            return
        elif (is_list_annotation(ref_type) and isinstance(node, ListConfig)):
            return
        elif isinstance(node, ValueNode):
            value = node._value()
            raise ValidationError((f'Value {value!r} ({type(value).__name__})' + f" is incompatible with type hint '{ref_type}'"))
        else:
            raise ValidationError((f"'{type(node).__name__}' is incompatible" + f" with type hint '{ref_type}'"))
    else:
        assert False
Error if node's type, content and metadata are not compatible with type_hint.
def _shallow_validate_type_hint(node: Node, type_hint: Any) -> None:
    
    from omegaconf import DictConfig, ListConfig, ValueNode
    (is_optional, ref_type) = _resolve_optional(type_hint)
    vk = get_value_kind(node)
    if node._is_none():
        if (not is_optional):
            value = _get_value(node)
            raise ValidationError((f'Value {value!r} ({type(value).__name__})' + f" is incompatible with type hint '{ref_type.__name__}'"))
        return
    elif (vk in (ValueKind.MANDATORY_MISSING, ValueKind.INTERPOLATION)):
        return
    elif (vk == ValueKind.VALUE):
        if (is_primitive_type(ref_type) and isinstance(node, ValueNode)):
            value = node._value()
            if (not isinstance(value, ref_type)):
                raise ValidationError((f'Value {value!r} ({type(value).__name__})' + f" is incompatible with type hint '{ref_type.__name__}'"))
        elif (is_structured_config(ref_type) and isinstance(node, DictConfig)):
            return
        elif (is_dict_annotation(ref_type) and isinstance(node, DictConfig)):
            return
        elif (is_list_annotation(ref_type) and isinstance(node, ListConfig)):
            return
        elif isinstance(node, ValueNode):
            value = node._value()
            raise ValidationError((f'Value {value!r} ({type(value).__name__})' + f" is incompatible with type hint '{ref_type}'"))
        else:
            raise ValidationError((f"'{type(node).__name__}' is incompatible" + f" with type hint '{ref_type}'"))
    else:
        assert False