nodes: 0, module; 1, function_definition; 2, function_name:sort; 3, parameters; 4, block; 5, identifier:base; 6, identifier:items; 7, expression_statement; 8, return_statement; 9, comment:"""Get a sorted list of items ranked in descending similarity.
  
      @param base: base item to perform comparison against
      @param items: list of items to compare to the base
      @return: list of items sorted by similarity to the base
  
      """; 10, call; 11, identifier:sorted; 12, argument_list; 13, identifier:items; 14, keyword_argument; 15, keyword_argument; 16, identifier:key; 17, attribute; 18, identifier:reverse; 19, True; 20, identifier:base; 21, identifier:similarity
code: def sort(base, items):
      """Get a sorted list of items ranked in descending similarity.
  
      @param base: base item to perform comparison against
      @param items: list of items to compare to the base
      @return: list of items sorted by similarity to the base
  
      """
      return sorted(items, key=base.similarity, reverse=True)