def is_oneof(proto_field_obj: FieldDescriptorProto) -> bool:
    """True if proto_field_obj is a OneOf, otherwise False.
    """
    if proto_field_obj.HasField("oneof_index"):
        return True
    return False