human
I wrote the below code

    if (not (isinstance(A, LinearOperator) or isspmatrix(A))):
        A = np.asarray(A)
    (n, m) = A.shape
    if ((k <= 0) or (k >= min(n, m))):
        raise ValueError(('k    must    be    between    1    and    min(A.shape),    k=%d' % k))
    if isinstance(A, LinearOperator):
        if (n > m):
            X_dot = A.matvec
            X_matmat = A.matmat
            XH_dot = A.rmatvec
        else:
            X_dot = A.rmatvec
            XH_dot = A.matvec
            dtype = getattr(A, 'dtype', None)
            if (dtype is None):
                dtype = A.dot(np.zeros([m, 1])).dtype
            def X_matmat(V):
                out = np.empty((V.shape[1], m), dtype=dtype)
                for (i, col) in enumerate(V.T):
                    out[i, :] = A.rmatvec(col.reshape((-1), 1)).T
                return out.T
    elif (n > m):
        X_dot = X_matmat = A.dot
        XH_dot = _herm(A).dot
    else:
        XH_dot = A.dot
        X_dot = X_matmat = _herm(A).dot
    def matvec_XH_X(x):
        return XH_dot(X_dot(x))
    XH_X = LinearOperator(matvec=matvec_XH_X, dtype=A.dtype, shape=(min(A.shape), min(A.shape)))
    (eigvals, eigvec) = eigsh(XH_X, k=k, tol=(tol ** 2), maxiter=maxiter, ncv=ncv, which=which, v0=v0)
    if (which == 'LM'):
        eigvals = np.maximum(eigvals.real, 0)
        t = eigvec.dtype.char.lower()
        factor = {'f': 1000.0, 'd': 1000000.0}
        cond = (factor[t] * np.finfo(t).eps)
        cutoff = (cond * np.max(eigvals))
        above_cutoff = (eigvals > cutoff)
        nlarge = above_cutoff.sum()
        nsmall = (k - nlarge)
        slarge = np.sqrt(eigvals[above_cutoff])
        s = np.zeros_like(eigvals)
        s[:nlarge] = slarge
        if (not return_singular_vectors):
            return s
        if (n > m):
            vlarge = eigvec[:, above_cutoff]
            ularge = ((X_matmat(vlarge) / slarge) if (return_singular_vectors != 'vh') else None)
            vhlarge = _herm(vlarge)
        else:
            ularge = eigvec[:, above_cutoff]
           ...

What's a good function header?

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

def svds(A, k=6, ncv=None, tol=0, which='LM', v0=None, maxiter=None, return_singular_vectors=True):