code: def visit_import(self, node, parent):
          
          names = [(alias.name, alias.asname) for alias in node.names]
          newnode = nodes.Import(
              names,
              getattr(node, "lineno", None),
              getattr(node, "col_offset", None),
              parent,
          )
          # save import names in parent's locals:
          for (name, asname) in newnode.names:
              name = asname or name
              parent.set_local(name.split(".")[0], newnode)
          return newnode
docs: visit a Import node by returning a fresh instance of it