def implements(*interfaces):
    """
    Decorator to mark a class as implementing the supplied interfaces.

    To implement an interface, the class instances must define all attributes
    in the interface.
    """
    # The decorator does not wrap the class. It simply runs the
    # `register_implementation` method for each interface, and returns
    # the original class.  This handily avoids many of the problems
    # typical of wrapping decorators. See
    # http://blog.dscpl.com.au/2014/01/how-you-implemented-your-python.html
    def decorator(cls):
        for interface in interfaces:
            interface.register_implementation(cls)
        return cls
    return decorator