def interpret_double(bb, context=None):
    """Convert a raw Double value to an integer.

    Returns 1 or 2 (unknown values are treated as 1).

    """
    if bb.strip() == b'2':
        return 2
    else:
        return 1
