<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def visit_global(self, node, parent):
 """visit a Global node to become astroid"""

        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