<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def pre_save(self, model_instance, add):
 """Remove dashes, spaces, and convert isbn to uppercase before saving when clean_isbn is enabled"""

        value = getattr(model_instance, self.attname)
        if self.clean_isbn and value not in EMPTY_VALUES:
            cleaned_isbn = value.replace(' ', '').replace('-', '').upper()
            setattr(model_instance, self.attname, cleaned_isbn)
        return super(ISBNField, self).pre_save(model_instance, add)