def has_index(self, index):
        """Tells if the field have an index matching the current one

        Parameters
        -----------
        index: type or BaseIndex
            It could be an index instance, or an index class

        Returns
        -------
        bool
            Will be ``True`` if the current field has an index that is an instance
            of the given index or of the class of the given index

        """
        klass = index if isclass(index) else index.__class__
        for one_index in self._indexes:
            if isinstance(one_index, klass):
                return True
        return False
Tells if the field have an index matching the current one

        Parameters
        -----------
        index: type or BaseIndex
            It could be an index instance, or an index class

        Returns
        -------
        bool
            Will be ``True`` if the current field has an index that is an instance
            of the given index or of the class of the given index