code: def serializer(self, create=False, many=False):
          
          if create and many:
              raise Exception('Can only set one of `create` or `many` to `True`')
  
          def wrapper(cls):
              cls.__kind__ = (create and 'create'
                              or many and 'many'
                              or 'all')
              return cls
          return wrapper
docs: Decorator to mark a :class:`Serializer` subclass for a specific purpose, ie,
          to be used during object creation **or** for serializing lists of objects.
  
          :param create: Whether or not this serializer is for object creation.
          :param many: Whether or not this serializer is for lists of objects.