code: def search(self, word, node=None):
      cur = node
      if not cur:
          cur = self.root
      for i, letter in enumerate(word):
          # if dot
          if letter == ".":
              if i == len(word) - 1:  # if last character
                  for child in cur.children.itervalues():
                      if child.is_terminal:
                          return True
                  return False
              for child in cur.children.itervalues():
                  if self.search(word[i + 1 :], child) == True:
                      return True
              return False
          # if letter
          if letter not in cur.children:
              return False
          cur = cur.children[letter]
      return cur.is_terminal
  
file_path: keon-algos/algorithms/tree/trie/add_and_search.py
imports: import collections
label_desc: Use image node_id 3 for calling the WordDictionary obj's underlying member method code with example usage: obj.search(word, node) and returns: cur, False, False, False, True, True