def to_polyline(polyline, name=None, extra_attrs=True):
    """Returns an ``eta.core.polylines.Polyline`` representation of the given
    :class:`fiftyone.core.labels.Polyline`.

    Args:
        polyline: a :class:`fiftyone.core.labels.Polyline`
        name (None): the name of the label field
        extra_attrs (True): whether to include custom attributes in the
            conversion

    Returns:
        an ``eta.core.polylines.Polyline``
    """
    attrs = _to_eta_attributes(polyline, extra_attrs=extra_attrs)

    return etap.Polyline(
        label=polyline.label,
        confidence=polyline.confidence,
        index=polyline.index,
        name=name,
        points=polyline.points,
        closed=polyline.closed,
        filled=polyline.filled,
        attrs=attrs,
        tags=polyline.tags,
    )
Returns an ``eta.core.polylines.Polyline`` representation of the given
    :class:`fiftyone.core.labels.Polyline`.

    Args:
        polyline: a :class:`fiftyone.core.labels.Polyline`
        name (None): the name of the label field
        extra_attrs (True): whether to include custom attributes in the
            conversion

    Returns:
        an ``eta.core.polylines.Polyline``
    
fiftyone/utils/eta.py