def get_handler_by_type_wm(write_manager, h_type):
    for h_l in write_manager.request_handlers.values():
        for h in h_l:
            if isinstance(h, h_type):
                return h
def get_handler_by_type_wm(write_manager, h_type):
    for h_l in write_manager.request_handlers.values():
        for h in h_l:
            if isinstance(h, h_type):
                return h