original_docstring: Update generated flatbuffer py files with apache license header.
docstring: Update generated flatbuffer py files with apache license header.
docstring_tokens: Update generated flatbuffer py files with apache license header .
code: def write_apache_license_header(generated_fbs_dir):
    """Update generated flatbuffer py files with apache license header."""
    generated_py_files = glob.glob(f'{generated_fbs_dir}/**/*.py', recursive=True)
    apache_license_header = ''
    apache_license_header_file = os.path.join(os.path.dirname(__file__),
                                              'apache_license_header.txt')
    with open(apache_license_header_file, 'r') as f:
      apache_license_header = f.read()
    for file in generated_py_files:
      with open(file, 'r') as f:
        content = f.read()
      with open(file, 'w') as f:
        f.write(apache_license_header + content)
code_tokens: def write_apache_license_header ( generated_fbs_dir ) : generated_py_files = glob . glob ( f'{generated_fbs_dir}/**/*.py' , recursive = True ) apache_license_header = '' apache_license_header_file = os . path . join ( os . path . dirname ( __file__ ) , 'apache_license_header.txt' ) with open ( apache_license_header_file , 'r' ) as f : apache_license_header = f . read ( ) for file in generated_py_files : with open ( file , 'r' ) as f : content = f . read ( ) with open ( file , 'w' ) as f : f . write ( apache_license_header + content )
short_docstring: Update generated flatbuffer py files with apache license header.
short_docstring_tokens: Update generated flatbuffer py files with apache license header .
comment: """Update generated flatbuffer py files with apache license header."""