def METHOD_NAME(loader, node):
    env_var = path_matcher.match(node.value).group(1)
    if env_var not in os.environ:
        raise EnvironmentError('Undefined environment variable in config')
    return get_typed_value(os.path.expandvars(node.value))