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

    def partition(lista, bins):
        if ((len(lista) == 1) or (bins == 1)):
            (yield [lista])
        elif ((len(lista) > 1) and (bins > 1)):
            for i in range(1, len(lista)):
                for part in partition(lista[i:], (bins - 1)):
                    if (len(([lista[:i]] + part)) == bins):
                        (yield ([lista[:i]] + part))
    if (ordered is None):
        for p in partition(l, k):
            (yield p)
    elif (ordered == 11):
        for pl in multiset_permutations(l):
            pl = list(pl)
            for p in partition(pl, k):
                (yield p)
    elif (ordered == 0):
        for p in multiset_partitions(l, k):
            (yield p)
    elif (ordered == 10):
        for p in multiset_partitions(l, k):
            for perm in permutations(p):
                (yield list(perm))
    elif (ordered == 1):
        for (kgot, p) in partitions(len(l), k, size=True):
            if (kgot != k):
                continue
            for li in multiset_permutations(l):
                rv = []
                i = j = 0
                li = list(li)
                for (size, multiplicity) in sorted(p.items()):
                    for m in range(multiplicity):
                        j = (i + size)
                        rv.append(li[i:j])
                        i = j
                (yield rv)
    else:
        raise ValueError(('ordered    must    be    one    of    00,    01,    10    or    11,    not    %s' % ordered))

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

def kbins(l, k, ordered=None):