def to_attribute(classification, name=None):
    """Returns an ``eta.core.data.Attribute`` representation of the
    :class:`fiftyone.core.labels.Classification`.

    Args:
        classification: a :class:`fiftyone.core.labels.Classification`
        name (None): the name of the label field

    Returns:
        a ``eta.core.data.CategoricalAttribute``
    """
    return etad.CategoricalAttribute(
        name,
        classification.label,
        confidence=classification.confidence,
        tags=classification.tags,
    )
Returns an ``eta.core.data.Attribute`` representation of the
    :class:`fiftyone.core.labels.Classification`.

    Args:
        classification: a :class:`fiftyone.core.labels.Classification`
        name (None): the name of the label field

    Returns:
        a ``eta.core.data.CategoricalAttribute``
    
fiftyone/utils/eta.py