human
Here's a good function header given the following:
I wrote the below code

    random_state = check_random_state(random_state)
    fun_args = ({} if (fun_args is None) else fun_args)
    X = check_array(X, copy=whiten, dtype=FLOAT_DTYPES).T
    alpha = fun_args.get('alpha', 1.0)
    if (not (1 <= alpha <= 2)):
        raise ValueError('alpha    must    be    in    [1,2]')
    if (fun == 'logcosh'):
        g = _logcosh
    elif (fun == 'exp'):
        g = _exp
    elif (fun == 'cube'):
        g = _cube
    elif callable(fun):
        def g(x, fun_args):
            return fun(x, **fun_args)
    else:
        exc = (ValueError if isinstance(fun, six.string_types) else TypeError)
        raise exc(("Unknown    function    %r.
   should    be    one    of    'logcosh',    'exp',    'cube'    or    callable" % fun))
    (n, p) = X.shape
    if ((not whiten) and (n_components is not None)):
        n_components = None
        warnings.warn('Ignoring    n_components    with    whiten=False.')
    if (n_components is None):
        n_components = min(n, p)
    if (n_components > min(n, p)):
        n_components = min(n, p)
        warnings.warn(('n_components    is    too    large:    it    will    be    set    to    %s' % n_components))
    if whiten:
        X_mean = X.mean(axis=(-1))
        X -= X_mean[:, np.newaxis]
        (u, d, _) = linalg.svd(X, full_matrices=False)
        del _
        K = (u / d).T[:n_components]
        del u, d
        X1 = np.dot(K, X)
        X1 *= np.sqrt(p)
    else:
        X1 = as_float_array(X, copy=False)
    if (w_init is None):
        w_init = np.asarray(random_state.normal(size=(n_components, n_components)), dtype=X1.dtype)
    else:
        w_init = np.asarray(w_init)
        if (w_init.shape != (n_components, n_components)):
            raise ValueError(('w_init    has    invalid    shape    --    should    be    %(shape)s' % {'shape': (n_components, n_components)}))
    kwargs = {'tol': tol, 'g': g, 'fun_args': fun_args, 'max_iter': max_iter, 'w_init': w_init}
    if (algorithm == 'parallel'):
        (W, n_iter) = _ica_par(X1, **kwargs)
   ...

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

def fastica(X, n_components=None, algorithm='parallel', whiten=True, fun='logcosh', fun_args=None, max_iter=200, tol=0.0001, w_init=None, random_state=None, return_X_mean=False, compute_sources=True, return_n_iter=False):