def query_for(_type):
 try:
  _type_n = _normalize_type(_type)
  return _QUERIES[_type_n]()
 except KeyError as ke:
  raise SearchError(('Unknown search type: %s' % _type))

def query_for ( _type ) : try : _type_n = _normalize_type ( _type ) return _QUERIES [ _type_n ] ( ) except KeyError as ke : raise SearchError ( ( 'Unknown search type: %s' % _type ) )
get a searchquery instance sub-class suitable for the specified type .