def oneof(self, name, types, **kwargs):
        """Defines a one-of property on the object.

        Args:
            name: the name of the property
            types: list of types that are instances of :class:`BaseType`


        Returns:
            a :class:`OneOf`
        """

        one_of = OneOf(types)
        self.define_property(name, one_of, **kwargs)
        return one_of
Defines a one-of property on the object.

        Args:
            name: the name of the property
            types: list of types that are instances of :class:`BaseType`


        Returns:
            a :class:`OneOf`
        
fiftyone/operators/types.py