def METHOD_NAME(params, image=None, gsparams=None, dtype=None):
    """Draw a Spergel profile in k-space onto the given image
    params = [ half_light_radius, flux, e1, e2, x0, y0 ]
    image is optional, but if provided will be used as is.
    """
    nu = 0.5
    gal = galsim.Spergel(nu, params[0], flux=params[1], gsparams=gsparams)
    gal = gal._shear(galsim._Shear(params[2] + 1j * params[3]))
    gal = gal._shift(galsim.PositionD(params[4],params[5]))
    if image is None:
        image = gal.drawKImage(dtype=dtype, nx=256, ny=256)
    else:
        image = gal._drawKImage(image)
    return image