def METHOD_NAME(helpers):
    """
    Test assigning incompatible keys to a circuit.
    """
    @fhe.compiler({"x": "encrypted"})
    def f(x):
        return x + 42
    @fhe.compiler({"x": "encrypted"})
    def g(x):
        return x**2
    f_circuit = f.compile(inputset=range(99), configuration=helpers.configuration())
    g_circuit = g.compile(inputset=range(10), configuration=helpers.configuration())
    f_circuit.keygen()
    g_circuit.keygen()
    with pytest.raises(ValueError) as excinfo:
        f_circuit.keys = g_circuit.keys
    expected_message = "Unable to set keys as they are generated for a different circuit"
    helpers.check_str(expected_message, str(excinfo.value))