code: def _guess_type_from_validator(validator):
      
      if isinstance(validator, _OptionalValidator):
          # Optional : look inside
          return _guess_type_from_validator(validator.validator)
  
      elif isinstance(validator, _AndValidator):
          # Sequence : try each of them
          for v in validator.validators:
              typ = _guess_type_from_validator(v)
              if typ is not None:
                  return typ
          return None
  
      elif isinstance(validator, _InstanceOfValidator):
          # InstanceOf validator : found it !
          return validator.type
  
      else:
          # we could not find the type
          return None
docs: Utility method to return the declared type of an attribute or None. It handles _OptionalValidator and _AndValidator
      in order to unpack the validators.
  
      :param validator:
      :return: the type of attribute declared in an inner 'instance_of' validator (if any is found, the first one is used)
      or None if no inner 'instance_of' validator is found