code: def cleanup(self):
          
          expires = maybe_timedelta(self.expires)
          for model in self.TaskModel, self.TaskSetModel:
              model._default_manager.delete_expired(expires)
docs: Delete expired metadata.