comefrom: <doocs>0211.Design Add and Search Words Data Structure_1.py
code: def search(word, node):
      for i in range(len(word)):
          c = word[i]
          idx = ord(c) - ord('a')
          if c != '.' and node.children[idx] is None:
              return False
          if c == '.':
              for child in node.children:
                  if child is not None and search(word[i + 1 :], child):
                      return True
              return False
          node = node.children[idx]
      return node.is_end
masked: def sample_funcname ( var_1 , var_2 ) :
      for var_5 in range ( len ( var_1 ) ) :
          var_6 = var_1 [ var_5 ]
          var_9 = ord ( var_6 ) - ord ( 'a' )
          if var_6 != '.' and var_2.children [ var_9 ] is None :
              return False
          if var_6 == '.' :
              for var_14 in var_2.children :
                  if var_14 is not None and var_0 ( var_1 [ var_5 + 1 : ] , var_14 ) :
                      return True
              return False
          var_2 = var_2.children [ var_9 ]
      return var_2.is_end
  