def METHOD_NAME(self, qname):
    # ExprNode.as_cython_attribute generates qnames and we untangle it here...
    name_path = qname.split(u'.')
    scope = self
    while len(name_path) > 1:
        scope = scope.lookup_here(name_path[0])
        if scope:
            scope = scope.as_module
        del name_path[0]
        if scope is None:
            return None
    else:
        return scope.lookup_here(name_path[0])