code: def _err(self, msg):
          
          out = '%s%s' % ('[%s] ' % self.description if len(self.description) > 0 else '', msg)
          if self.kind == 'warn':
              print(out)
              return self
          elif self.kind == 'soft':
              global _soft_err
              _soft_err.append(out)
              return self
          else:
              raise AssertionError(out)
docs: Helper to raise an AssertionError, and optionally prepend custom description.