'Get a value from the cell contained in this function\'s closure.
If not set, return a ir.UNDEFINED.'

def get_closure_value(self, index):

    cell = self.func_id.func.__closure__[index]
    try:
        return cell.cell_contents
    except ValueError:
        return ir.UNDEFINED
