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

    data_zip_path = generator_utils.maybe_download_from_drive(directory=tmp_dir, filename=_DATASET_FILENAME, url=_DATASET_URL)
    tf.logging.info('Data    downloaded    in:    {}'.format(data_zip_path))
    data_rootdir = os.path.join(tmp_dir, _DATASET_PB_PATH)
    if (not tf.gfile.Exists(data_rootdir)):
        with zipfile.ZipFile(data_zip_path, 'r') as corpus_zip:
            corpus_zip.extractall(tmp_dir)
        tf.logging.info('Data    extracted    in:    {}'.format(tmp_dir))
    else:
        tf.logging.info('Data    already    extracted    in:    {}'.format(tmp_dir))
    def contains_samples(subdir, dirs, files):
        'Check    that    the    folder    contains    a    problem.'
        return ((_DESC_DIR_NAME in dirs) and (pb_cst.code_dir_name in dirs))
    def next_sample(subdir, dirs, files):
        'Return    the    filenames    of    the    problem.'
        desc_file = os.path.join(subdir, _DESC_DIR_NAME, 'description.txt')
        code_files = []
        code_pattern = os.path.join(subdir, pb_cst.code_dir_name, '*.txt')
        for f in tf.gfile.Glob(code_pattern):
            with tf.gfile.GFile(f, mode='r') as target_file:
                content = target_file.read()
                if (not any(((p in content) for p in pb_cst.filter_patterns))):
                    code_files.append(f)
        return CodingPbInfo(desc_file=desc_file, code_files=code_files)
    for w in tf.gfile.Walk(data_rootdir):
        if contains_samples(*w):
            (yield next_sample(*w))

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

def generator_samples(tmp_dir, pb_cst):