def METHOD_NAME(self, basis):
    coef1 = randn(basis.count, seed=self.seed)
    coef1 = coef1.astype(basis.dtype)
    im = basis.evaluate(coef1)
    if isinstance(im, Image):
        im = im.asnumpy()
    coef2 = basis.expand(im)[0]
    assert coef1.shape == coef2.shape
    assert np.allclose(coef1, coef2, atol=utest_tolerance(basis.dtype))