def connect_to_api(self):
        """Returns an API instance connected to the annotation backend.

        Existing API instances are reused, if available.

        Some annotation backends may not expose this functionality.

        Returns:
            an :class:`AnnotationAPI`, or ``None`` if the backend does not
            expose an API
        """
        if self._api is None:
            # pylint: disable=assignment-from-none
            self._api = self._connect_to_api()

        return self._api
Returns an API instance connected to the annotation backend.

        Existing API instances are reused, if available.

        Some annotation backends may not expose this functionality.

        Returns:
            an :class:`AnnotationAPI`, or ``None`` if the backend does not
            expose an API
        
fiftyone/utils/annotations.py