def get_store_from_scheme(context, scheme, loc=None):
 if (scheme not in location.SCHEME_TO_CLS_MAP):
  raise exception.UnknownScheme(scheme=scheme)
 scheme_info = location.SCHEME_TO_CLS_MAP[scheme]
 store = scheme_info['store_class'](context, loc)
 return store

def get_store_from_scheme ( context , scheme , loc = None ) : if ( scheme not in location . SCHEME_TO_CLS_MAP ) : raise exception . UnknownScheme ( scheme = scheme ) scheme_info = location . SCHEME_TO_CLS_MAP [ scheme ] store = scheme_info [ 'store_class' ] ( context , loc ) return store
given a scheme .