code: def types(cls):
          
          redundant_types = \
              set(cls.types_mapping) & set(cls._types_from_methods)
          if redundant_types:
              warn("These types are defined both with a method and in the"
                   "'types_mapping' property of this validator: %s"
                   % redundant_types)
  
          return tuple(cls.types_mapping) + cls._types_from_methods
docs: The constraints that can be used for the 'type' rule.
              Type: A tuple of strings.