code: def is_valid(self, value):
          
          if not self.is_array:
              return self._valid(value)
  
          if isinstance(value, (list, set, tuple)):
              return all([self._valid(item) for item in value])
  
          return self._valid(value)
docs: Validate value before actual instance setting based on type.
  
          Args:
              value (object): The value object for validation.
  
          Returns:
              True if value validation succeeds else False.