def test_double_value():
    """Note: due to backwards compatibility, double_val conversion is one-way.
    double_val can be converted to python float,
    but a python float is converted into a float_val not a double_val.
    """
    msg = v2.program_pb2.Arg()
    msg.arg_value.double_value = 1.0
    parsed = arg_from_proto(msg)
    assert parsed == 1
    msg = v2.program_pb2.Arg()
    msg.arg_value.double_value = 1.5
    parsed = arg_from_proto(msg)
    assert parsed == 1.5
Note: due to backwards compatibility, double_val conversion is one-way.
    double_val can be converted to python float,
    but a python float is converted into a float_val not a double_val.
    
cirq-google/cirq_google/serialization/arg_func_langs_test.py