code: def clean_expired_user_attempts(attempt_time: datetime = None) -> int:
      
  
      if settings.AXES_COOLOFF_TIME is None:
          log.debug('AXES: Skipping clean for expired access attempts because no AXES_COOLOFF_TIME is configured')
          return 0
  
      threshold = get_cool_off_threshold(attempt_time)
      count, _ = AccessAttempt.objects.filter(attempt_time__lt=threshold).delete()
      log.info('AXES: Cleaned up %s expired access attempts from database that were older than %s', count, threshold)
      return count
docs: Clean expired user attempts from the database.