def _retrive_branch(k, trie):
 if (not k):
  return None
 for c in k:
  child_branch = _get_child_branch(trie, c)
  if (not child_branch):
   return None
  trie = child_branch
 return trie

def _retrive_branch ( k , trie ) : if ( not k ) : return None for c in k : child_branch = _get_child_branch ( trie , c ) if ( not child_branch ) : return None trie = child_branch return trie
get branch matching the key word .