original_docstring: Generates flatbuffer python files.
  
    Flatbuffer schema files are read from falken/service/fbs/ and generated in
    /fbs_dir under the current working directory unless the parent path is
    explicitly specified in environment variable FALKEN_GENERATED_FLATBUFFERS_DIR.
  
    Also inserts the apache license text at the top of each generated flatbuffer
    python file.
    
docstring: Generates flatbuffer python files.
  Flatbuffer schema files are read from falken/service/fbs/ and generated in
  fbs_dir under the current working directory unless the parent path is
  explicitly specified in environment variable FALKEN_GENERATED_FLATBUFFERS_DIR.
  
  Also inserts the apache license text at the top of each generated flatbuffer
  python file.
docstring_tokens: Generates flatbuffer python files . Flatbuffer schema files are read from falken / service / fbs / and generated in fbs_dir under the current working directory unless the parent path is explicitly specified in environment variable FALKEN_GENERATED_FLATBUFFERS_DIR . Also inserts the apache license text at the top of each generated flatbuffer python file .
code: def generate():
    """Generates flatbuffer python files.
  
    Flatbuffer schema files are read from falken/service/fbs/ and generated in
    /fbs_dir under the current working directory unless the parent path is
    explicitly specified in environment variable FALKEN_GENERATED_FLATBUFFERS_DIR.
  
    Also inserts the apache license text at the top of each generated flatbuffer
    python file.
    """
    generated_fbs_dir = get_generated_flatbuffers_dir()
  
    if not pip_installer.find_module_by_name('tflite.Model',
                                             search_path=generated_fbs_dir):
      if getattr(sys, 'frozen', False):
        raise ModuleNotFoundError('FlatBuffers modules not frozen.')
      temp_dir = tempfile.mkdtemp()
      flatc = os.path.normpath(
          os.path.join(
              install_flatc(temp_dir),
              'Debug' if platform.system() == 'Windows' else '',
              'flatc.exe' if platform.system() == 'Windows' else 'flatc'))
      generated_fbs_dir = get_generated_flatbuffers_dir()
      if not os.path.exists(generated_fbs_dir):
        os.makedirs(generated_fbs_dir)
      downloaded_fbs_dir = download_external_fbs(temp_dir)
      args = [
          flatc, '--python',
          '-o', generated_fbs_dir,
          '-I', downloaded_fbs_dir,
          '--gen-object-api',
      ]
  
      args.extend(glob.glob(f'{downloaded_fbs_dir}/**/*.fbs', recursive=True))
      subprocess.run(args, check=True)
  
      shutil.rmtree(temp_dir)
      write_apache_license_header(generated_fbs_dir)
      importlib.invalidate_caches()
  
    os.environ['FALKEN_GENERATED_FLATBUFFERS_DIR'] = (
        os.path.abspath(os.path.join(generated_fbs_dir, os.pardir)))
    sys.path.append(generated_fbs_dir)
code_tokens: def generate ( ) : generated_fbs_dir = get_generated_flatbuffers_dir ( ) if not pip_installer . find_module_by_name ( 'tflite.Model' , search_path = generated_fbs_dir ) : if getattr ( sys , 'frozen' , False ) : raise ModuleNotFoundError ( 'FlatBuffers modules not frozen.' ) temp_dir = tempfile . mkdtemp ( ) flatc = os . path . normpath ( os . path . join ( install_flatc ( temp_dir ) , 'Debug' if platform . system ( ) == 'Windows' else '' , 'flatc.exe' if platform . system ( ) == 'Windows' else 'flatc' ) ) generated_fbs_dir = get_generated_flatbuffers_dir ( ) if not os . path . exists ( generated_fbs_dir ) : os . makedirs ( generated_fbs_dir ) downloaded_fbs_dir = download_external_fbs ( temp_dir ) args = [ flatc , '--python' , '-o' , generated_fbs_dir , '-I' , downloaded_fbs_dir , '--gen-object-api' , ] args . extend ( glob . glob ( f'{downloaded_fbs_dir}/**/*.fbs' , recursive = True ) ) subprocess . run ( args , check = True ) shutil . rmtree ( temp_dir ) write_apache_license_header ( generated_fbs_dir ) importlib . invalidate_caches ( ) os . environ [ 'FALKEN_GENERATED_FLATBUFFERS_DIR' ] = ( os . path . abspath ( os . path . join ( generated_fbs_dir , os . pardir ) ) ) sys . path . append ( generated_fbs_dir )
short_docstring: Generates flatbuffer python files.
short_docstring_tokens: Generates flatbuffer python files .
comment: """Generates flatbuffer python files.
  
    Flatbuffer schema files are read from falken/service/fbs/ and generated in
    /fbs_dir under the current working directory unless the parent path is
    explicitly specified in environment variable FALKEN_GENERATED_FLATBUFFERS_DIR.
  
    Also inserts the apache license text at the top of each generated flatbuffer
    python file.
    """