human
I wrote the below code

    LOG.debug('Packing    an    instance    onto    a    set    of    siblings:                    available_siblings:    %(siblings)s                instance_cell:    %(cells)s                host_cell_id:    %(host_cell_id)s                threads_per_core:    %(threads_per_core)s', {'siblings': available_siblings, 'cells': instance_cell, 'host_cell_id': host_cell_id, 'threads_per_core': threads_per_core})
    sibling_sets = collections.defaultdict(list)
    for sib in available_siblings:
        for threads_no in range(1, (len(sib) + 1)):
            sibling_sets[threads_no].append(sib)
    LOG.debug('Built    sibling_sets:    %(siblings)s', {'siblings': sibling_sets})
    pinning = None
    threads_no = 1
    def _orphans(instance_cell, threads_per_core):
        'Number    of    instance    CPUs    which    will    not    fill    up    a    host    core.\n\n                                Best    explained    by    an    example:    consider    set    of    free    host    cores    as    such:\n                                                [(0,    1),    (3,    5),    (6,    7,    8)]\n                                This    would    be    a    case    of    2    threads_per_core    AKA    an    entry    for    2    in    the\n                                sibling_sets    structure.\n\n                                If    we    attempt    to    pack    a    5    core    instance    on    it    -    due    to    the    fact    that    we\n                                iterate    the    list    in    order,    we    will    end    up    with    a    single    core    of    the\n                                instance    pinned    to    a    thread    "alone"    (with    id    6),    and    we    would    have    one\n                                \'orphan\'    vcpu.\n                                '
        return (len(instance_cell) % threads_per_core)
    def _threads(instance_cell, threads_per_core):
        "Threads    to    expose    to    the    instance    via    the   ...

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

def _pack_instance_onto_cores(available_siblings, instance_cell, host_cell_id, threads_per_core=1, num_cpu_reserved=0):