'Handle cleanup for \'with gil\' blocks in nogil functions.'

def _handle_nogil_cleanup(self, lenv, node):

    if (lenv.nogil and lenv.has_with_gil_block):
        node.body = Nodes.NogilTryFinallyStatNode(node.body.pos, body=node.body, finally_clause=Nodes.EnsureGILNode(node.body.pos), finally_except_clause=Nodes.EnsureGILNode(node.body.pos))
