def get_import(self, sym: sym.Symbol) -> Optional[types.ModuleType]:
mod = self.imports.entry(sym, None)<EOL>if mod is None:<EOL><INDENT>alias = self.import_aliases.get(sym, None)<EOL>if alias is None:<EOL><INDENT>return None<EOL><DEDENT>return self.imports.entry(alias, None)<EOL><DEDENT>return mod<EOL>
Return the module if a moduled named by sym has been imported into
        this Namespace, None otherwise.

        First try to resolve a module directly with the given name. If no module
        can be resolved, attempt to resolve the module using import aliases.