'Do constant folding.'

def fold(self, node):

    node = self.generic_visit(node)
    try:
        return nodes.Const.from_untrusted(node.as_const(), lineno=node.lineno, environment=self.environment)
    except nodes.Impossible:
        return node
