def enumerate(array, start=0):
        """Returns an array of ``[index, element]`` pairs enumerating the
        elements of the given expression, which must resolve to an 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"]),
                    fo.Sample(filepath="image2.jpg", tags=["y", "z"]),
                ]
            )

            # Populates an `enumerated_tags` field with the enumerated `tag`
            dataset.add_sample_field("enumerated_tags", fo.ListField)
            view = dataset.set_field("enumerated_tags", F.enumerate(F("tags")))

            print(view.first())

        Args:
            array: a :class:`ViewExpression` that resolves to an array
            start (0): the starting enumeration index to use

        Returns:
            a :class:`ViewExpression`
        """
        expr = ViewExpression.zip(
            ViewExpression.range(start, stop=start + array.length()),
            array,
        )
        return array.let_in(expr)
Returns an array of ``[index, element]`` pairs enumerating the
        elements of the given expression, which must resolve to an 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"]),
                    fo.Sample(filepath="image2.jpg", tags=["y", "z"]),
                ]
            )

            # Populates an `enumerated_tags` field with the enumerated `tag`
            dataset.add_sample_field("enumerated_tags", fo.ListField)
            view = dataset.set_field("enumerated_tags", F.enumerate(F("tags")))

            print(view.first())

        Args:
            array: a :class:`ViewExpression` that resolves to an array
            start (0): the starting enumeration index to use

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