def decode_input(input_proto):
    """Obtain an instance of Input from a protobuf.

    Args:
        input_proto: The protobuf instance representing the input

    Returns:
        The input decoded from the protobuf
    """
    for inp in input_proto:
        yield getattr(inp, inp.WhichOneof('value'))
