code: def ladderLength(self, beginWord, endWord, wordList):
      """
      :type beginWord: str
      :type endWord: str
      :type wordList: Set[str]
      :rtype: int
      """
      # two way bfs
      # one way is not sufficient
      wordList.discard(beginWord)
      wordList.discard(endWord)
      hash_map, res = {}, []
      res = self.bfs(set([beginWord]), set([endWord]), wordList, 2)
      return res
  
imports: import string
label_desc: Use image node_id 1 for calling the Solution obj's underlying member method code with example usage: obj.ladderLength(beginWord, endWord, wordList) and returns: res