def METHOD_NAME(nx, nh):
    x = np.random.randint(-30, 30, size=(nx, nx)) + 1.0
    np.save("x", x)
    h = np.random.randint(-20, 20, size=(nh, nh)) + 1.0
    gold = fftconvolve(x, h, "same")
    def testinner(maxlen):
        nfft = [nextprod([2, 3], x) for x in np.array(h.shape) + maxlen - 1]
        hpre = prepareh(h, nfft)
        for xlen0 in range(maxlen):
            for ylen0 in range(maxlen):
                ylen, xlen = 1 + ylen0, 1 + xlen0
                dirt = np.vstack(
                    [
                        np.hstack(
                            [
                                olsStep(x, hpre, [ystart, xstart], [ylen, xlen], nfft, h.shape)
                                for xstart in range(0, x.shape[0], xlen)
                            ]
                        )
                        for ystart in range(0, x.shape[1], ylen)
                    ]
                )
                assert np.allclose(dirt, gold)
                dirt2 = ols(x, h, [ylen, xlen], nfft)
                assert np.allclose(dirt2, gold)
                dirt3 = ols(x, h, [ylen, xlen])
                assert np.allclose(dirt3, gold)
                memx = np.lib.format.open_memmap("x.npy")
                memout = np.lib.format.open_memmap(
                    "out.npy", mode="w+", dtype=x.dtype, shape=x.shape
                )
                dirtmem = ols(memx, h, [ylen, xlen], out=memout)
                assert np.allclose(dirtmem, gold)
                del memout
                del memx
                dirtmem2 = np.load("out.npy")
                assert np.allclose(dirtmem2, gold)
                del dirtmem2
                del dirtmem
    testinner(8)