def zip(*args, use_longest=False, defaults=None):
        """Zips the given expressions, which must resolve to arrays, into an
        array whose ith element is an array containing the ith element from
        each input array.

        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", "c"],
                        ints=[1, 2, 3, 4, 5],
                    ),
                    fo.Sample(
                        filepath="image2.jpg",
                        tags=["y", "z"],
                        ints=[25, 26, 27, 28],
                    ),
                ]
            )

            dataset.add_sample_field("tags_ints", fo.ListField)

            # Populates an `tags_ints` field with the zipped `tags` and `ints`
            view = dataset.set_field("tags_ints", F.zip(F("tags"), F("ints")))

            print(view.first())

            # Same as above but use the longest array to determine output size
            view = dataset.set_field(
                "tags_ints",
                F.zip(F("tags"), F("ints"), use_longest=True, defaults=("", 0))
            )

            print(view.first())

        Args:
            *args: one or more arrays or :class:`ViewExpression` instances
                resolving to arrays
            use_longest (False): whether to use the longest array to determine
                the number of elements in the output array. By default, the
                length of the shortest array is used
            defaults (None): an optional array of default values of same length
                as ``*args`` to use when ``use_longest == True`` and the input
                arrays are of different lengths. If no defaults are provided
                and ``use_longest == True``, then missing values are set to
                ``None``

        Returns:
            a :class:`ViewExpression`
        """
        if not use_longest:
            return ViewExpression({"$zip": {"inputs": list(args)}})

        zip_expr = {"inputs": list(args), "useLongestLength": True}
        if defaults is not None:
            zip_expr["defaults"] = defaults

        return ViewExpression({"$zip": zip_expr})
Zips the given expressions, which must resolve to arrays, into an
        array whose ith element is an array containing the ith element from
        each input array.

        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", "c"],
                        ints=[1, 2, 3, 4, 5],
                    ),
                    fo.Sample(
                        filepath="image2.jpg",
                        tags=["y", "z"],
                        ints=[25, 26, 27, 28],
                    ),
                ]
            )

            dataset.add_sample_field("tags_ints", fo.ListField)

            # Populates an `tags_ints` field with the zipped `tags` and `ints`
            view = dataset.set_field("tags_ints", F.zip(F("tags"), F("ints")))

            print(view.first())

            # Same as above but use the longest array to determine output size
            view = dataset.set_field(
                "tags_ints",
                F.zip(F("tags"), F("ints"), use_longest=True, defaults=("", 0))
            )

            print(view.first())

        Args:
            *args: one or more arrays or :class:`ViewExpression` instances
                resolving to arrays
            use_longest (False): whether to use the longest array to determine
                the number of elements in the output array. By default, the
                length of the shortest array is used
            defaults (None): an optional array of default values of same length
                as ``*args`` to use when ``use_longest == True`` and the input
                arrays are of different lengths. If no defaults are provided
                and ``use_longest == True``, then missing values are set to
                ``None``

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