def _find_es_dict_by_key(lookup_dict, term):
 if (term in lookup_dict):
  return (lookup_dict, term)
 dict_cursor = lookup_dict
 subkeys = term.split('.')
 subkey = ''
 while (len(subkeys) > 0):
  subkey += subkeys.pop(0)
  if (subkey in dict_cursor):
   if (len(subkeys) == 0):
    break
   dict_cursor = dict_cursor[subkey]
   subkey = ''
  elif (len(subkeys) == 0):
   dict_cursor = None
   subkey = None
  else:
   subkey += '.'
 return (dict_cursor, subkey)

def _find_es_dict_by_key ( lookup_dict , term ) : if ( term in lookup_dict ) : return ( lookup_dict , term ) dict_cursor = lookup_dict subkeys = term . split ( '.' ) subkey = '' while ( len ( subkeys ) > 0 ) : subkey += subkeys . pop ( 0 ) if ( subkey in dict_cursor ) : if ( len ( subkeys ) == 0 ) : break dict_cursor = dict_cursor [ subkey ] subkey = '' elif ( len ( subkeys ) == 0 ) : dict_cursor = None subkey = None else : subkey += '.' return ( dict_cursor , subkey )
performs iterative dictionary search based upon the following conditions: 1 .