nodes: 0, module; 1, function_definition; 2, function_name:get_entries; 3, parameters; 4, block; 5, identifier:path; 6, expression_statement; 7, expression_statement; 8, for_statement; 9, expression_statement; 10, expression_statement; 11, return_statement; 12, comment:"""Return sorted lists of directories and files in the given path."""; 13, assignment; 14, identifier:entry; 15, call; 16, comment:# Categorize entry as directory or file.; 17, block; 18, call; 19, call; 20, expression_list; 21, pattern_list; 22, expression_list; 23, attribute; 24, argument_list; 25, if_statement; 26, attribute; 27, argument_list; 28, attribute; 29, argument_list; 30, identifier:dirs; 31, identifier:files; 32, identifier:dirs; 33, identifier:files; 34, list; 35, list; 36, identifier:os; 37, identifier:listdir; 38, identifier:path; 39, call; 40, block; 41, else_clause; 42, identifier:dirs; 43, identifier:sort; 44, identifier:files; 45, identifier:sort; 46, attribute; 47, argument_list; 48, expression_statement; 49, block; 50, attribute; 51, identifier:isdir; 52, call; 53, call; 54, expression_statement; 55, identifier:os; 56, identifier:path; 57, attribute; 58, argument_list; 59, attribute; 60, argument_list; 61, call; 62, attribute; 63, identifier:join; 64, identifier:path; 65, identifier:entry; 66, identifier:dirs; 67, identifier:append; 68, identifier:entry; 69, attribute; 70, argument_list; 71, identifier:os; 72, identifier:path; 73, identifier:files; 74, identifier:append; 75, identifier:entry
code: def get_entries(path):
      """Return sorted lists of directories and files in the given path."""
      dirs, files = [], []
      for entry in os.listdir(path):
          # Categorize entry as directory or file.
          if os.path.isdir(os.path.join(path, entry)):
              dirs.append(entry)
          else:
              files.append(entry)
      dirs.sort()
      files.sort()
      return dirs, files