code: def visit_global(self, node, parent):
          
          newnode = nodes.Global(
              node.names,
              getattr(node, "lineno", None),
              getattr(node, "col_offset", None),
              parent,
          )
          if self._global_names:  # global at the module level, no effect
              for name in node.names:
                  self._global_names[-1].setdefault(name, []).append(newnode)
          return newnode
docs: visit a Global node to become astroid