def structure(**kwargs):
    """Creates a struct given some keyword arguments.

    Note that all objects created with `structure` will have the same
    class type.

    Example:

        >>> player = structure(health=100, stamina=75, magic=50)
        >>> monster = structure(health=150, stamina=100, magic=0)

    """
    class Structure(object):
        __slots__ = list(kwargs.keys())

        def __repr__(self):
            attribs = []
            for k in self.__slots__:
                try:
                    attribs.append("{}={}".format(k, self.__getattribute__(k)))
                except AttributeError:
                    attribs.append("{}=Undefined".format(k))
            return "Struct Attributes: {}".format(", ".join(attribs))

        def apply(self, **kwargs):
            for k, v in kwargs.items():
                setattr(self, k, v)
            return self

    return Structure().apply(**kwargs)