@decorators.raise_if_nothing_inferred<EOL>@decorators.path_wrapper<EOL>def infer_import(self, context=None, asname=True):
name = context.lookupname<EOL>if name is None:<EOL><INDENT>raise exceptions.InferenceError(node=self, context=context)<EOL><DEDENT>try:<EOL><INDENT>if asname:<EOL><INDENT>yield self.do_import_module(self.real_name(name))<EOL><DEDENT>else:<EOL><INDENT>yield self.do_import_module(name)<EOL><DEDENT><DEDENT>except exceptions.AstroidBuildingError as exc:<EOL><INDENT>raise exceptions.InferenceError(node=self, context=context) from exc<EOL><DEDENT>
infer an Import node: return the imported module/object