def METHOD_NAME(self, xp, scp, n):
    # but in general we only guarantee we get the magnitude back
    rng = cupy.random.RandomState(0)
    h = rng.randn(n)
    if xp != cupy:
        h = h.get()
    h_new = scp.signal.minimum_phase(xp.convolve(h, h[::-1]))
    return h_new