code: def find_root_thrifts(basedirs, sources, log=None):
    
  
    root_sources = set(sources)
    for source in sources:
      root_sources.difference_update(find_includes(basedirs, source, log=log))
    return root_sources
docs: Finds the root thrift files in the graph formed by sources and their recursive includes.
  
    :basedirs: A set of thrift source file base directories to look for includes in.
    :sources: Seed thrift files to examine.
    :log: An optional logger.