nodes: 0, module; 1, function_definition; 2, function_name:sorted_walk; 3, parameters; 4, block; 5, identifier:dir; 6, expression_statement; 7, for_statement; 8, comment:"""Do os.walk in a reproducible way,
      independent of indeterministic filesystem readdir order
      """; 9, pattern_list; 10, call; 11, block; 12, identifier:base; 13, identifier:dirs; 14, identifier:files; 15, attribute; 16, argument_list; 17, expression_statement; 18, expression_statement; 19, expression_statement; 20, identifier:os; 21, identifier:walk; 22, identifier:dir; 23, call; 24, call; 25, yield; 26, attribute; 27, argument_list; 28, attribute; 29, argument_list; 30, expression_list; 31, identifier:dirs; 32, identifier:sort; 33, identifier:files; 34, identifier:sort; 35, identifier:base; 36, identifier:dirs; 37, identifier:files
code: def sorted_walk(dir):
      """Do os.walk in a reproducible way,
      independent of indeterministic filesystem readdir order
      """
      for base, dirs, files in os.walk(dir):
          dirs.sort()
          files.sort()
          yield base, dirs, files