def dhcp_configuration_from_querystring(querystring, option=u'DhcpConfiguration'):
 key_needle = re.compile(u'{0}.[0-9]+.Key'.format(option), re.UNICODE)
 response_values = {}
 for (key, value) in querystring.items():
  if key_needle.match(key):
   values = []
   key_index = key.split(u'.')[1]
   value_index = 1
   while True:
    value_key = u'{0}.{1}.Value.{2}'.format(option, key_index, value_index)
    if (value_key in querystring):
     values.extend(querystring[value_key])
    else:
     break
    value_index += 1
   response_values[value[0]] = values
 return response_values

def dhcp_configuration_from_querystring ( querystring , option = u'DhcpConfiguration' ) : key_needle = re . compile ( u'{0}.[0-9]+.Key' . format ( option ) , re . UNICODE ) response_values = { } for ( key , value ) in querystring . items ( ) : if key_needle . match ( key ) : values = [ ] key_index = key . split ( u'.' ) [ 1 ] value_index = 1 while True : value_key = u'{0}.{1}.Value.{2}' . format ( option , key_index , value_index ) if ( value_key in querystring ) : values . extend ( querystring [ value_key ] ) else : break value_index += 1 response_values [ value [ 0 ] ] = values return response_values
turn: {uawsaccesskeyid: [uthe_key] .