human
I wrote the below code

    nvals = len(vals)
    indices_ = lrange(nvals)
    rejected = []
    subsetsli = []
    if (np.size(dcrit) == 1):
        dcrit = (dcrit * np.ones((nvals, nvals)))
    def subsets(vals, indices_):
        'recursive    function    for    constructing    homogeneous    subset\n\n                                registers    rejected    and    subsetli    in    outer    scope\n                                '
        (i, j) = (indices_[0], indices_[(-1)])
        if ((vals[(-1)] - vals[0]) > dcrit[(i, j)]):
            rejected.append((indices_[0], indices_[(-1)]))
            return [subsets(vals[:(-1)], indices_[:(-1)]), subsets(vals[1:], indices_[1:]), (indices_[0], indices_[(-1)])]
        else:
            subsetsli.append(tuple(indices_))
            return indices_
    res = subsets(vals, indices_)
    all_pairs = [(i, j) for i in range(nvals) for j in range((nvals - 1), i, (-1))]
    rejs = set(rejected)
    not_rejected = list((set(all_pairs) - rejs))
    return (list(rejs), not_rejected, list(set(subsetsli)), res)

What's a good function header?

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

def homogeneous_subsets(vals, dcrit):