nodes: 0, module; 1, function_definition; 2, function_name:searchitem; 3, parameters; 4, block; 5, identifier:self; 6, identifier:item; 7, default_parameter; 8, expression_statement; 9, return_statement; 10, identifier:threshold; 11, None; 12, comment:"""Search the index for items whose key exceeds the threshold
          similarity to the key of the given item.
  
          :return: list of pairs of (item, similarity) by decreasing similarity.
  
          >>> from ngram import NGram
          >>> n = NGram([(0, "SPAM"), (1, "SPAN"), (2, "EG"),
          ... (3, "SPANN")], key=lambda x:x[1])
          >>> sorted(n.searchitem((2, "SPA"), 0.35))
          [((0, 'SPAM'), 0.375), ((1, 'SPAN'), 0.375)]
          """; 13, call; 14, attribute; 15, argument_list; 16, identifier:self; 17, identifier:search; 18, call; 19, identifier:threshold; 20, attribute; 21, argument_list; 22, identifier:self; 23, identifier:key; 24, identifier:item
code: def searchitem(self, item, threshold=None):
          """Search the index for items whose key exceeds the threshold
          similarity to the key of the given item.
  
          :return: list of pairs of (item, similarity) by decreasing similarity.
  
          >>> from ngram import NGram
          >>> n = NGram([(0, "SPAM"), (1, "SPAN"), (2, "EG"),
          ... (3, "SPANN")], key=lambda x:x[1])
          >>> sorted(n.searchitem((2, "SPA"), 0.35))
          [((0, 'SPAM'), 0.375), ((1, 'SPAN'), 0.375)]
          """
          return self.search(self.key(item), threshold)