def contains(self, values, all=False):
        """Checks whether this expression, which must resolve to an array,
        contains any of the given values.

        Pass ``all=True`` to require that this expression contains all of the
        given values.

        Examples::

            import fiftyone as fo
            import fiftyone.zoo as foz
            from fiftyone import ViewField as F

            dataset = foz.load_zoo_dataset("quickstart")
            print(dataset.count())

            # Only contains samples with a "cat" prediction
            view = dataset.match(
                F("predictions.detections.label").contains("cat")
            )
            print(view.count())

            # Only contains samples with "cat" or "dog" predictions
            view = dataset.match(
                F("predictions.detections.label").contains(["cat", "dog"])
            )
            print(view.count())

            # Only contains samples with "cat" and "dog" predictions
            view = dataset.match(
                F("predictions.detections.label").contains(["cat", "dog"], all=True)
            )
            print(view.count())

        Args:
            values: a value, iterable of values, or :class:`ViewExpression`
                that resolves to an array of values
            all (False): whether this expression must contain all (True) or
                any (False) of the given values

        Returns:
            a :class:`ViewExpression`
        """
        if not isinstance(values, ViewExpression):
            if etau.is_container(values):
                values = list(values)
                if len(values) == 1:
                    values = values[0]

            if isinstance(values, ViewExpression) or not etau.is_container(
                values
            ):
                return ViewExpression({"$in": [values, self]})

        if not all:
            return self.intersection(values).length() > 0

        if not isinstance(values, ViewExpression):
            values = ViewExpression(values)

        return values.is_subset(self)
Checks whether this expression, which must resolve to an array,
        contains any of the given values.

        Pass ``all=True`` to require that this expression contains all of the
        given values.

        Examples::

            import fiftyone as fo
            import fiftyone.zoo as foz
            from fiftyone import ViewField as F

            dataset = foz.load_zoo_dataset("quickstart")
            print(dataset.count())

            # Only contains samples with a "cat" prediction
            view = dataset.match(
                F("predictions.detections.label").contains("cat")
            )
            print(view.count())

            # Only contains samples with "cat" or "dog" predictions
            view = dataset.match(
                F("predictions.detections.label").contains(["cat", "dog"])
            )
            print(view.count())

            # Only contains samples with "cat" and "dog" predictions
            view = dataset.match(
                F("predictions.detections.label").contains(["cat", "dog"], all=True)
            )
            print(view.count())

        Args:
            values: a value, iterable of values, or :class:`ViewExpression`
                that resolves to an array of values
            all (False): whether this expression must contain all (True) or
                any (False) of the given values

        Returns:
            a :class:`ViewExpression`
        
fiftyone/core/expressions.py