def METHOD_NAME(t, k, axis, mag, freq, off=0, mode='noise', seeds=None):
    d = t.driver_add(k, axis)
    p = getattr(t, k)[axis]
    if k == 'location':
        mag *= ls[axis]
    freq = freq / bpy.context.scene.render.fps
    freq *= freq_scalar
    mag *= mag_scalar
    if mode == 'noise':
        s1, s2 = seeds if seeds is not None else U(0, 1000, 2) # random offsets as 'seeds'
        varying = f'noise.noise(({freq:.6f}*frame, {s1:.2f}, {s2:.2f}))'
    elif mode == 'sin':
        varying = f'sin({freq:6f}*frame*2*pi)'
    else:
        raise ValueError(mode)
    d.driver.expression = f'{p:.4f}+{mag:.4f}*({off:.4f}+{varying})'