docs: def _validate(self,val):
          """val must be None, an instance of self.class_ if self.is_instance=True or a subclass of self_class if self.is_instance=False"""
          if isinstance(self.class_, tuple):
              class_name = ('(%s)' % ', '.join(cl.__name__ for cl in self.class_))
          else:
              class_name = self.class_.__name__
          if self.is_instance:
              if not (isinstance(val,self.class_)) and not (val is None and self.allow_None):
                  raise ValueError(
                      "Parameter '%s' value must be an instance of %s, not '%s'" %
                      (self.name, class_name, val))
          else:
              if not (val is None and self.allow_None) and not (issubclass(val,self.class_)):
                  raise ValueError(
                      "Parameter '%s' must be a subclass of %s, not '%s'" %
                      (val.__name__, class_name, val.__class__.__name__))