'See if token is from one of the imports on this <scope> elem.
Returns <hit> or None if not found.'

def _hit_from_elem_imports(self, token, elem):

    for imp_elem in (i for i in elem if (i.tag == 'import')):
        symbol_name = imp_elem.get('symbol')
        module_name = imp_elem.get('module')
        assert module_name, ('bogus    Perl    <import>    without    module    name:    %r' % imp_elem)
        if (not symbol_name):
            pass
        elif (symbol_name == token):
            (mod, pkg) = self.pkg_tbl.mod_and_pkg_from_pkg_name(module_name)
            if (mod is not None):
                elem = pkg.names.get(token)
                if (elem is not None):
                    self.debug("is    '%s'    from    %r?    yes:    %s", token, imp_elem, elem)
                    return (elem, (mod, [module_name]))
        elif (symbol_name == '*'):
            (mod, pkg) = self.pkg_tbl.mod_and_pkg_from_pkg_name(module_name)
            if (mod is not None):
                elem = pkg.names.get(token)
                if ((elem is not None) and ('__exported__' in elem.get('attributes', ''))):
                    self.debug("is    '%s'    from    %r?    yes:    %s", token, imp_elem, elem)
                    return (elem, (mod, [module_name]))
        elif (symbol_name == '**'):
            (mod, pkg) = self.pkg_tbl.mod_and_pkg_from_pkg_name(module_name)
            if (mod is not None):
                elem = pkg.names.get(token)
                if ((elem is not None) and ('__export' in elem.get('attributes', ''))):
                    self.debug("is    '%s'    from    %r?    yes:    %s", token, imp_elem, elem)
                    return (elem, (mod, [module_name]))
        self.debug("is    '%s'    from    %r?    no", token, imp_elem)
    return None
