code: def _validate_attributes_type(self):
          
          for _attr, _class in self._get_attributes():
              if isinstance(_attr, _class):
                  return True
              elif issubclass(_class, GenericType):
                  if GenericStruct._attr_fits_into_class(_attr, _class):
                      return True
              elif not isinstance(_attr, _class):
                  return False
          return True
docs: Validate the type of each attribute.