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

    def generate():
        filepath = os.path.join(tmp_dir, source_filename)
        tf.logging.info('Generating    vocab    from    %s', filepath)
        with tf.gfile.GFile(filepath, mode='r') as source_file:
            for line in source_file:
                line = line.strip()
                if (line and (' DCTB ' in line)):
                    parts = line.split(' DCTB ', maxsplit=1)
                    part = parts[index].strip()
                    (yield part)
    return get_or_generate_vocab_inner(data_dir, vocab_filename, vocab_size, generator_fn=generate)

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

def get_or_generate_tabbed_vocab(data_dir, tmp_dir, source_filename, index, vocab_filename, vocab_size):