def METHOD_NAME(self):
    # fanout with raise
    def func(n):
        ary = np.arange(n)
        # basically an impl of array.sum
        c = 0
        # The raise is from StopIteration of next(iterator) implicit in
        # the for loop
        for v in np.nditer(ary):
            c += v.item()
        return 1
    with set_refprune_flags('per_bb,fanout_raise'):
        self.check(func, (types.intp), basicblock=True, diamond=False,
                   fanout=False, fanout_raise=True)