def difference(self, values):
        """Computes the set difference of this expression, which must resolve
        to an array, and the given array or array expression.

        The arrays are treated as sets, so all duplicates are removed.

        Examples::

            import fiftyone as fo
            from fiftyone import ViewField as F

            dataset = fo.Dataset()
            dataset.add_samples(
                [
                    fo.Sample(
                        filepath="image1.jpg",
                        tags=["a", "b"],
                        other_tags=["a", "c"]
                    )
                ]
            )

            print(dataset.values(F("tags").difference(F("other_tags"))))
            # [['b']]

        Args:
            values: an iterable of values or a :class:`ViewExpression` that
                resolves to an array

        Returns:
            a :class:`ViewExpression`
        """
        if isinstance(values, ViewExpression):
            other = values
        else:
            other = list(values)

        return ViewExpression({"$setDifference": [self, other]})
Computes the set difference of this expression, which must resolve
        to an array, and the given array or array expression.

        The arrays are treated as sets, so all duplicates are removed.

        Examples::

            import fiftyone as fo
            from fiftyone import ViewField as F

            dataset = fo.Dataset()
            dataset.add_samples(
                [
                    fo.Sample(
                        filepath="image1.jpg",
                        tags=["a", "b"],
                        other_tags=["a", "c"]
                    )
                ]
            )

            print(dataset.values(F("tags").difference(F("other_tags"))))
            # [['b']]

        Args:
            values: an iterable of values or a :class:`ViewExpression` that
                resolves to an array

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