<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 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