def from_anno_dict(cls, d, extra_attrs=True):
        """Creates a :class:`COCOObject` from a COCO annotation dict.

        Args:
            d: a COCO annotation dict
            extra_attrs (True): whether to load extra annotation attributes.
                Supported values are:

                -   ``True``: load all extra attributes
                -   ``False``: do not load extra attributes
                -   a name or list of names of specific attributes to load

        Returns:
            a :class:`COCOObject`
        """
        # Handles CVAT exported attributes
        if "attributes" in d:
            d.update(d.pop("attributes", {}))

        if extra_attrs is True:
            return cls(**d)

        if etau.is_str(extra_attrs):
            extra_attrs = [extra_attrs]

        if extra_attrs:
            attributes = {f: d.get(f, None) for f in extra_attrs}
        else:
            attributes = {}

        return cls(
            id=d.get("id", None),
            image_id=d.get("image_id", None),
            category_id=d.get("category_id", None),
            bbox=d.get("bbox", None),
            segmentation=d.get("segmentation", None),
            keypoints=d.get("keypoints", None),
            score=d.get("score", None),
            area=d.get("area", None),
            iscrowd=d.get("iscrowd", None),
            **attributes,
        )
Creates a :class:`COCOObject` from a COCO annotation dict.

        Args:
            d: a COCO annotation dict
            extra_attrs (True): whether to load extra annotation attributes.
                Supported values are:

                -   ``True``: load all extra attributes
                -   ``False``: do not load extra attributes
                -   a name or list of names of specific attributes to load

        Returns:
            a :class:`COCOObject`
        
fiftyone/utils/coco.py