nodes: 0, module; 1, function_definition; 2, function_name:spell; 3, parameters; 4, type; 5, block; 6, identifier:self; 7, typed_parameter; 8, generic_type; 9, expression_statement; 10, if_statement; 11, expression_statement; 12, expression_statement; 13, return_statement; 14, identifier:word; 15, type; 16, identifier:List; 17, type_parameter; 18, comment:"""
          Return a list of possible words, according to edit distance of 1 and 2,
          sorted by frequency of word occurrance in the spelling dictionary
  
          :param str word: A word to check its spelling
          """; 19, not_operator; 20, block; 21, assignment; 22, call; 23, identifier:candidates; 24, identifier:str; 25, type; 26, identifier:word; 27, return_statement; 28, identifier:candidates; 29, parenthesized_expression; 30, attribute; 31, argument_list; 32, identifier:str; 33, string:""; 34, boolean_operator; 35, identifier:candidates; 36, identifier:sort; 37, keyword_argument; 38, keyword_argument; 39, boolean_operator; 40, list; 41, identifier:key; 42, attribute; 43, identifier:reverse; 44, True; 45, boolean_operator; 46, call; 47, identifier:word; 48, identifier:self; 49, identifier:freq; 50, call; 51, call; 52, attribute; 53, argument_list; 54, attribute; 55, argument_list; 56, attribute; 57, argument_list; 58, identifier:self; 59, identifier:known; 60, call; 61, identifier:self; 62, identifier:known; 63, list; 64, identifier:self; 65, identifier:known; 66, call; 67, identifier:_edits2; 68, argument_list; 69, identifier:word; 70, identifier:_edits1; 71, argument_list; 72, identifier:word; 73, identifier:word
code: def spell(self, word: str) -> List[str]:
          """
          Return a list of possible words, according to edit distance of 1 and 2,
          sorted by frequency of word occurrance in the spelling dictionary
  
          :param str word: A word to check its spelling
          """
          if not word:
              return ""
  
          candidates = (
              self.known([word])
              or self.known(_edits1(word))
              or self.known(_edits2(word))
              or [word]
          )
          candidates.sort(key=self.freq, reverse=True)
  
          return candidates