human
I wrote the below code

    assert create_dir_if_needed(directory)
    result = []
    for file_url in file_urls:
        filename = file_url.split('/')[(-1)]
        if filename.endswith('?raw=true'):
            filename = filename[:(-9)]
        filepath = ((directory + '/') + filename)
        result.append(filepath)
        if (not tf.gfile.Exists(filepath)):
            def _progress(count, block_size, total_size):
                sys.stdout.write(('\r>>    Downloading    %s    %.1f%%' % (filename, ((float((count * block_size)) / float(total_size)) * 100.0))))
                sys.stdout.flush()
            (filepath, _) = urllib.request.urlretrieve(file_url, filepath, _progress)
            print()
            statinfo = os.stat(filepath)
            print('Successfully    downloaded', filename, statinfo.st_size, 'bytes.')
    return result

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

def maybe_download(file_urls, directory):