<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_exec(self, node):
 """return an astroid.Exec node as string"""

        if node.locals:
            return "exec %s in %s, %s" % (
                node.expr.accept(self),
                node.locals.accept(self),
                node.globals.accept(self),
            )
        if node.globals:
            return "exec %s in %s" % (node.expr.accept(self), node.globals.accept(self))
        return "exec %s" % node.expr.accept(self)