def to_keypoints(keypoint, name=None, extra_attrs=True):
    """Returns an ``eta.core.keypoints.Keypoints`` representation of the given
    :class:`fiftyone.core.labels.Keypoint`.

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

    Returns:
        an ``eta.core.keypoints.Keypoints``
    """
    attrs = _to_eta_attributes(keypoint, extra_attrs=extra_attrs)

    return etak.Keypoints(
        name=name,
        label=keypoint.label,
        index=keypoint.index,
        points=keypoint.points,
        confidence=keypoint.confidence,
        attrs=attrs,
        tags=keypoint.tags,
    )
Returns an ``eta.core.keypoints.Keypoints`` representation of the given
    :class:`fiftyone.core.labels.Keypoint`.

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

    Returns:
        an ``eta.core.keypoints.Keypoints``
    
fiftyone/utils/eta.py