'Resolve the given node to a namespace.
E.g. given a Node representing `foo.bar` return the namespace (the
Scope instance) for `foo` and the name "bar".
@returns {tuple} (<name>, <scope for name>)'

def _resolve_power_node(self, node):

    DEBUG = True
    if DEBUG:
        print ("--    resolve    `%s'" % re.sub('\\s+', '    ', str(node)))
    children = node.children
    name = children[0].value
    for scope in self._iter_scopes():
        if DEBUG:
            print ('find    first    name    %r    in    %r' % (name, scope))
        try:
            var = scope[name]
        except KeyError:
            pass
        else:
            break
    else:
        return None
    vscope = scope
    if DEBUG:
        print ('first    name    %r    is    %r    in    %r' % (name, var, vscope))
    citdl = var.attrs.get('citdl')
    if (not citdl):
        log.debug("cannot    resolve    var    '%s':    no    type    inference    (CITDL)", name)
        return None
    (name, scope) = self._resolve_citdl(citdl, vscope)
    if DEBUG:
        print ('citdl    %r    ->    (%r,    %r)' % (citdl, name, scope))
    return (name, scope)
    XXX
