def use_floatx(x):
    """Context manager to temporarily
    set the keras backend precision.
    """
    _floatx = floatx()
    set_floatx(x)
    try:
        yield
    finally:
        set_floatx(_floatx)
Context manager to temporarily
    set the keras backend precision.
    
keras/src/wrappers/sklearn_test.py