<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def clear_indexes(self, chunk_size=1000, aggressive=False, index_class=None):
 """Clear all indexes tied to this field Parameters chunk_size: int Default to 1000, it's the number of instances to load at once if not in aggressive mode. aggressive: bool Default to ``False``. When ``False``, the actual collection of instances will be ran through to deindex all the values. But when ``True``, the database keys will be scanned to find keys that matches the pattern of the keys used by the indexes. This is a lot faster and may find forgotten keys. But may also find keys not related to the index. Should be set to ``True`` if you are not sure about the already indexed values. index_class: type Allow to clear only index(es) for this index class instead of all indexes. Raises ------ AssertionError If called from an instance field. It must be called from the model field Also raised if the field is not indexable Examples -------- """

        assert self.indexable, "Field not indexable"
        assert self.attached_to_model, \
            '`rebuild_indexes` can only be called on a field attached to the model'

        for index in self._indexes:
            if index_class and not isinstance(index, index_class):
                continue
            index.clear(chunk_size=chunk_size, aggressive=aggressive)