code: def validate(self, obj):
          
          if not isinstance(obj, self.internal_type):
              raise ValidationError(obj, self.internal_type)
          return True
docs: Validate convertibility to internal representation
  
          Returns
          -------
          bool
            True if 'obj' matches the data type
  
          Raises
          -------
          ValidationError
              If the validation fails