human
I wrote the below code

    if isinstance(data_csds, CrossSpectralDensity):
        data_csds = [data_csds]
    if isinstance(noise_csds, CrossSpectralDensity):
        noise_csds = [noise_csds]
    def csd_shapes(x):
        return tuple((c.data.shape for c in x))
    if ((csd_shapes(data_csds) != csd_shapes(noise_csds)) or any(((len(set(csd_shapes(c))) > 1) for c in [data_csds, noise_csds]))):
        raise ValueError('One    noise    CSD    matrix    should    be    provided    for    each    data    CSD    matrix    and    vice    versa.    All    CSD    matrices    should    have    identical    shape.')
    frequencies = []
    for (data_csd, noise_csd) in zip(data_csds, noise_csds):
        if (not np.allclose(data_csd.frequencies, noise_csd.frequencies)):
            raise ValueError('Data    and    noise    CSDs    should    be    calculated    at    identical    frequencies')
        if (len(data_csd.frequencies) > 1):
            frequencies.append(np.mean(data_csd.frequencies))
        else:
            frequencies.append(data_csd.frequencies[0])
    fmin = frequencies[0]
    if (len(frequencies) > 2):
        fstep = []
        for i in range((len(frequencies) - 1)):
            fstep.append((frequencies[(i + 1)] - frequencies[i]))
        if (not np.allclose(fstep, np.mean(fstep), 1e-05)):
            warn('Uneven    frequency    spacing    in    CSD    object,    frequencies    in    the    resulting    stc    file    will    be    inaccurate.')
        fstep = fstep[0]
    elif (len(frequencies) > 1):
        fstep = (frequencies[1] - frequencies[0])
    else:
        fstep = 1
    picks = _setup_picks(picks=None, info=info, forward=forward)
    (is_free_ori, _, proj, vertno, G) = _prepare_beamformer_input(info, forward, label, picks=picks, pick_ori=pick_ori)
    n_orient = (3 if is_free_ori else 1)
    n_sources = (G.shape[1] // n_orient)
    source_power = np.zeros((n_sources, len(data_csds)))
    n_csds = len(data_csds)
    logger.info('Computing    DICS    source    power...')
    for (i, (data_csd, noise_csd))...

What's a good function header?
 Here's a good function header?
assistant
#Here's a good function header.

@verbose
def dics_source_power(info, forward, noise_csds, data_csds, reg=0.05, label=None, pick_ori=None, real_filter=False, verbose=None):