nodes: 0, module; 1, function_definition; 2, function_name:find_write_contribs; 3, parameters; 4, type; 5, block; 6, None; 7, expression_statement; 8, expression_statement; 9, comment:# type: Dict[str, List[str]]; 10, for_statement; 11, expression_statement; 12, comment:# type: Dict[str, List[str]]; 13, for_statement; 14, comment:# now sort the str contents of the list value; 15, expression_statement; 16, expression_statement; 17, comment:# type: List[Tuple[str, List[str]]]; 18, expression_statement; 19, expression_statement; 20, comment:"""Look for files, find authors, sort, write file."""; 21, assignment; 22, identifier:filename; 23, call; 24, block; 25, assignment; 26, pattern_list; 27, call; 28, block; 29, assignment; 30, assignment; 31, assignment; 32, call; 33, identifier:map_file_auth; 34, dictionary; 35, identifier:scantree; 36, argument_list; 37, expression_statement; 38, comment:# type: str; 39, expression_statement; 40, comment:# type: List[str]; 41, if_statement; 42, identifier:map_auth_file; 43, call; 44, identifier:file; 45, identifier:authors_file; 46, attribute; 47, argument_list; 48, for_statement; 49, identifier:map_auth_file; 50, call; 51, identifier:map_auth_file_sorted; 52, call; 53, identifier:map_auth_file; 54, call; 55, identifier:write_contribs; 56, argument_list; 57, string; 58, assignment; 59, assignment; 60, identifier:authors_list; 61, block; 62, identifier:defaultdict; 63, argument_list; 64, identifier:map_file_auth; 65, identifier:items; 66, identifier:author; 67, identifier:authors_file; 68, block; 69, identifier:sort_def_dict; 70, argument_list; 71, identifier:sorted; 72, argument_list; 73, identifier:OrderedDict; 74, argument_list; 75, identifier:map_auth_file; 76, string_content:cltk; 77, identifier:filepath; 78, attribute; 79, identifier:authors_list; 80, call; 81, expression_statement; 82, identifier:list; 83, expression_statement; 84, identifier:map_auth_file; 85, call; 86, identifier:map_auth_file_sorted; 87, identifier:filename; 88, identifier:path; 89, identifier:get_authors; 90, argument_list; 91, assignment; 92, call; 93, attribute; 94, argument_list; 95, identifier:filepath; 96, subscript; 97, identifier:authors_list; 98, attribute; 99, argument_list; 100, identifier:map_auth_file; 101, identifier:items; 102, identifier:map_file_auth; 103, identifier:filepath; 104, subscript; 105, identifier:append; 106, identifier:file; 107, identifier:map_auth_file; 108, identifier:author
code: def find_write_contribs() -> None:
      """Look for files, find authors, sort, write file."""
      map_file_auth = {}  # type: Dict[str, List[str]]
      for filename in scantree('cltk'):
          filepath = filename.path  # type: str
          authors_list = get_authors(filepath)  # type: List[str]
          if authors_list:
              map_file_auth[filepath] = authors_list
  
      map_auth_file = defaultdict(list)  # type: Dict[str, List[str]]
      for file, authors_file in map_file_auth.items():
          for author in authors_file:
              map_auth_file[author].append(file)
      # now sort the str contents of the list value
      map_auth_file = sort_def_dict(map_auth_file)
      map_auth_file_sorted = sorted(map_auth_file.items())  # type: List[Tuple[str, List[str]]]
      map_auth_file = OrderedDict(map_auth_file_sorted)
  
      write_contribs(map_auth_file)