<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def from_kwargs(cls, **kwargs):
 """Initialise configuration from kwargs."""

        config = cls()
        for slot in cls.__slots__:

            if slot.startswith('_'):
                slot = slot[1:]
            setattr(config, slot, kwargs.pop(slot, cls.get_default(slot)))

        if kwargs:
            raise ValueError("Unrecognized option(s): {}".format(kwargs.keys()))
        return config