code: def validate(self, value):
          
          if isinstance(value, self._types):
              return value
  
          elif self.optional and value is None:
              return [] if self.repeated else None
  
          elif self.repeated and isinstance(value, (tuple, list)) and all(isinstance(x, self._types) for x in value):
              return value
  
          else:
              raise TypeError(f"Value of type {classname(value)} assigned to {classname(self)} property.")
docs: Validates that `value` can be assigned to this Property.
  
          Parameters:
            value: The value to validate.
  
          Raises:
            TypeError: If the type of the assigned value is invalid.
  
          Returns:
            The value that should be assigned to the entity.