def get_index_information(
        self, include_stats=False, _keep_index_names=False
    ):
        """Returns a dictionary of information about the indexes on this
        collection.

        See :meth:`pymongo:pymongo.collection.Collection.index_information` for
        details on the structure of this dictionary.

        Args:
            include_stats (False): whether to include the size, usage, and
                build status of each index

        Returns:
            a dict mapping index names to info dicts
        """
        index_info = {}

        # Sample-level indexes
        fields_map = self._get_db_fields_map(reverse=True)
        sample_info = self._dataset._sample_collection.index_information()

        if include_stats:
            cs = self._dataset._sample_collstats()
            for key, size in cs["indexSizes"].items():
                if key in sample_info:
                    sample_info[key]["size"] = size

            for key in cs.get("indexBuilds", []):
                if key in sample_info:
                    sample_info[key]["in_progress"] = True

            for d in self._dataset._sample_collection.aggregate(
                [{"$indexStats": {}}]
            ):
                key = d["name"]
                if key in sample_info:
                    sample_info[key]["accesses"] = d["accesses"]

        for key, info in sample_info.items():
            if len(info["key"]) == 1 and not _keep_index_names:
                field = info["key"][0][0]
                key = fields_map.get(field, field)

            index_info[key] = info

        if self._has_frame_fields():
            # Frame-level indexes
            fields_map = self._get_db_fields_map(frames=True, reverse=True)
            frame_info = self._dataset._frame_collection.index_information()

            if include_stats:
                cs = self._dataset._frame_collstats()
                for key, size in cs["indexSizes"].items():
                    if key in frame_info:
                        frame_info[key]["size"] = size

                for key in cs.get("indexBuilds", []):
                    if key in frame_info:
                        frame_info[key]["in_progress"] = True

                for d in self._dataset._frame_collection.aggregate(
                    [{"$indexStats": {}}]
                ):
                    key = d["name"]
                    if key in frame_info:
                        frame_info[key]["accesses"] = d["accesses"]

            for key, info in frame_info.items():
                if len(info["key"]) == 1 and not _keep_index_names:
                    field = info["key"][0][0]
                    key = fields_map.get(field, field)

                index_info[self._FRAMES_PREFIX + key] = info

        return index_info
Returns a dictionary of information about the indexes on this
        collection.

        See :meth:`pymongo:pymongo.collection.Collection.index_information` for
        details on the structure of this dictionary.

        Args:
            include_stats (False): whether to include the size, usage, and
                build status of each index

        Returns:
            a dict mapping index names to info dicts
        
fiftyone/core/collections.py