<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def ffht(fEM, time, freq, ftarg):
 r"""Fourier Transform using the Digital Linear Filter method. It follows the Filter methodology [Ande75]_, using Cosine- and Sine-filters; see ``fht`` for more information. The function is called from one of the modelling routines in :mod:`model`. Consult these modelling routines for a description of the input and output parameters. This function is based on ``get_CSEM1D_TD_FHT.m`` from the source code distributed with [Key12]_. Returns ------- tEM : array Returns time-domain EM response of ``fEM`` for given ``time``. conv : bool Only relevant for QWE/QUAD. """

    # Get ffhtargs
    ffhtfilt = ftarg[0]
    pts_per_dec = ftarg[1]
    kind = ftarg[2]  # Sine (`sin`) or cosine (`cos`)

    # Cast into Standard DLF format
    if pts_per_dec == 0:
        fEM = fEM.reshape(time.size, -1)

    # Carry out DLF
    tEM = dlf(fEM, 2*np.pi*freq, time, ffhtfilt, pts_per_dec, kind=kind)

    # Return the electromagnetic time domain field
    # (Second argument is only for QWE)
    return tEM, True