parameters: (output_dir, libraries)
docstring: Write a list of libraries to disk.
  
    Args:
      output_dir: Output directory.
      libraries: List of (filename, library) pairs.
docstring_summary: Write a list of libraries to disk.
docstring_tokens: Write a list of libraries to disk .
function: def write_libraries(output_dir, libraries):
    """Write a list of libraries to disk.
  
    Args:
      output_dir: Output directory.
      libraries: List of (filename, library) pairs.
    """
    files = [open(os.path.join(output_dir, k), "w") for k, _ in libraries]
  
    # Set the directory in which to save individual class and function md files,
    # creating it if it doesn't exist. Create subdirectories to avoid hitting
    # the limit for number of files in a directory.
    indiv_dir = os.path.join(output_dir, _indiv_dir)
    if not os.path.exists(indiv_dir):
      os.makedirs(indiv_dir)
  
    for i in range(0, _num_subdirs):
      subdir = os.path.join(indiv_dir, _subdir_prefix + str(i))
      if not os.path.exists(subdir):
        os.makedirs(subdir)
  
    # Document mentioned symbols for all libraries
    for f, (_, v) in zip(files, libraries):
      v.set_functions_and_classes_dir(indiv_dir)
      v.write_markdown_to_file(f)
    # Document symbols that no library mentioned.  We do this after writing
    # out all libraries so that earlier libraries know what later libraries
    # documented.
    for f, (_, v) in zip(files, libraries):
      v.write_other_members(f)
      f.close()
function_tokens: def write_libraries ( output_dir , libraries ) : files = [ open ( os . path . join ( output_dir , k ) , "w" ) for k , _ in libraries ] # Set the directory in which to save individual class and function md files, # creating it if it doesn't exist. Create subdirectories to avoid hitting # the limit for number of files in a directory. indiv_dir = os . path . join ( output_dir , _indiv_dir ) if not os . path . exists ( indiv_dir ) : os . makedirs ( indiv_dir ) for i in range ( 0 , _num_subdirs ) : subdir = os . path . join ( indiv_dir , _subdir_prefix + str ( i ) ) if not os . path . exists ( subdir ) : os . makedirs ( subdir ) # Document mentioned symbols for all libraries for f , ( _ , v ) in zip ( files , libraries ) : v . set_functions_and_classes_dir ( indiv_dir ) v . write_markdown_to_file ( f ) # Document symbols that no library mentioned.  We do this after writing # out all libraries so that earlier libraries know what later libraries # documented. for f , ( _ , v ) in zip ( files , libraries ) : v . write_other_members ( f ) f . close ( )