code: def should_retry_on(self, exception_class, logger=None):
          
          for n in (self.retry_on or []):
              try:
                  if issubclass(exception_class, import_attribute(n)):
                      return True
              except TaskImportError:
                  if logger:
                      logger.error('should_retry_on could not import class',
                                   exception_name=n)
          return False
docs: Whether this task should be retried when the given exception occurs.