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

    from scipy.optimize import leastsq
    kwargs = {'epsfcn': 0.01}
    kwargs.update(leastsq_args)
    src_pts = np.atleast_2d(src_pts)
    tgt_pts = np.atleast_2d(tgt_pts)
    translate = bool(translate)
    rotate = bool(rotate)
    scale = int(scale)
    if translate:
        src_pts = np.hstack((src_pts, np.ones((len(src_pts), 1))))
    try:
        from sklearn.neighbors import BallTree
        tgt_pts = BallTree(tgt_pts)
        errfunc = _point_cloud_error_balltree
    except ImportError:
        warn('Sklearn    could    not    be    imported.    Fitting    points    will    be    slower.    To    improve    performance,    install    the    sklearn    module.')
        errfunc = _point_cloud_error
    param_info = (rotate, translate, scale)
    if (param_info == (True, False, 0)):
        x0 = (x0 or (0, 0, 0))
        def error(x):
            (rx, ry, rz) = x
            trans = rotation3d(rx, ry, rz)
            est = dot(src_pts, trans.T)
            err = errfunc(est, tgt_pts)
            return err
    elif (param_info == (True, False, 1)):
        x0 = (x0 or (0, 0, 0, 1))
        def error(x):
            (rx, ry, rz, s) = x
            trans = (rotation3d(rx, ry, rz) * s)
            est = dot(src_pts, trans.T)
            err = errfunc(est, tgt_pts)
            return err
    elif (param_info == (True, False, 3)):
        x0 = (x0 or (0, 0, 0, 1, 1, 1))
        def error(x):
            (rx, ry, rz, sx, sy, sz) = x
            trans = (rotation3d(rx, ry, rz) * [sx, sy, sz])
            est = dot(src_pts, trans.T)
            err = errfunc(est, tgt_pts)
            return err
    elif (param_info == (True, True, 0)):
        x0 = (x0 or (0, 0, 0, 0, 0, 0))
        def error(x):
            (rx, ry, rz, tx, ty, tz) = x
            trans = dot(translation(tx, ty, tz), rotation(rx, ry, rz))
            est = dot(src_pts, trans.T)
            err = errfunc(est[:, :3], tgt_pts)
            return err
    else:
        raise NotImplementedError(('The    specified    parameter    combination   ...

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

def fit_point_cloud(src_pts, tgt_pts, rotate=True, translate=True, scale=0, x0=None, leastsq_args={}, out='params'):