def _default_key_normalizer(key_class, request_context):
 context = {}
 for key in key_class._fields:
  context[key] = request_context.get(key)
 context['scheme'] = context['scheme'].lower()
 context['host'] = context['host'].lower()
 return key_class(**context)

def _default_key_normalizer ( key_class , request_context ) : context = { } for key in key_class . _fields : context [ key ] = request_context . get ( key ) context [ 'scheme' ] = context [ 'scheme' ] . lower ( ) context [ 'host' ] = context [ 'host' ] . lower ( ) return key_class ( ** context )
create a pool key of type key_class for a request .