def register_factory(factory, from_protocol, to_protocol):
    manager = get_global_adaptation_manager()
    return manager.register_factory(factory, from_protocol, to_protocol)
"Test the login state.
dataset/ETHPy150Open enthought/traits/traits/adaptation/adaptation_manager.py/register_factory--crossover with--dataset/ETHPy150Open home-assistant/home-assistant/tests/components/camera/test_uvc.py/TestUVC.test_camera_image_logged_in