def assign_funcs(modname, service, module=None, get_conn_funcname='_get_conn', cache_id_funcname='_cache_id', exactly_one_funcname='_exactly_one'):
 mod = sys.modules[modname]
 setattr(mod, get_conn_funcname, get_connection_func(service, module=module))
 setattr(mod, cache_id_funcname, cache_id_func(service))
 if (exactly_one_funcname is not None):
  setattr(mod, exactly_one_funcname, exactly_one)

def assign_funcs ( modname , service , module = None , get_conn_funcname = '_get_conn' , cache_id_funcname = '_cache_id' , exactly_one_funcname = '_exactly_one' ) : mod = sys . modules [ modname ] setattr ( mod , get_conn_funcname , get_connection_func ( service , module = module ) ) setattr ( mod , cache_id_funcname , cache_id_func ( service ) ) if ( exactly_one_funcname is not None ) : setattr ( mod , exactly_one_funcname , exactly_one )
assign _get_conn and _cache_id functions to the named module .