def get_node_value(key: Union[(DictKeyType, int)]) -> Any:
    try:
        node = conf._get_node(key, throw_on_missing_value=throw_on_missing)
    except MissingMandatoryValue as e:
        conf._format_and_raise(key=key, value=None, cause=e)
    assert isinstance(node, Node)
    if resolve:
        try:
            node = node._dereference_node()
        except InterpolationResolutionError as e:
            conf._format_and_raise(key=key, value=None, cause=e)
    if isinstance(node, Container):
        value = BaseContainer._to_content(node, resolve=resolve, throw_on_missing=throw_on_missing, enum_to_str=enum_to_str, structured_config_mode=structured_config_mode)
    else:
        value = convert(node)
    return value
def get_node_value(key: Union[(DictKeyType, int)]) -> Any:
    try:
        node = conf._get_node(key, throw_on_missing_value=throw_on_missing)
    except MissingMandatoryValue as e:
        conf._format_and_raise(key=key, value=None, cause=e)
    assert isinstance(node, Node)
    if resolve:
        try:
            node = node._dereference_node()
        except InterpolationResolutionError as e:
            conf._format_and_raise(key=key, value=None, cause=e)
    if isinstance(node, Container):
        value = BaseContainer._to_content(node, resolve=resolve, throw_on_missing=throw_on_missing, enum_to_str=enum_to_str, structured_config_mode=structured_config_mode)
    else:
        value = convert(node)
    return value