human
I wrote the below code

    n = (len(inputs) - 1)
    if (n == 0):
        return tuple(idx_list)
    indices = list(reversed(list(inputs[1:])))
    def convert(entry):
        if isinstance(entry, gof.Type):
            return indices.pop()
        elif isinstance(entry, slice):
            return slice(convert(entry.start), convert(entry.stop), convert(entry.step))
        else:
            return entry
    cdata = tuple(map(convert, idx_list))
    if get_count:
        return (n - len(indices))
    else:
        return cdata

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

def get_idx_list(inputs, idx_list, get_count=False):