Declares :term:`interfaces <interface>` as implemented by class `cls`.
    Those already declared are overriden.

def set_implemented_interfaces(cls, interfaces):
    """
    Declares :term:`interfaces <interface>` as implemented by class `cls`.
    Those already declared are overriden.
    """
    setattr(
        cls,
        '__interfaces__',
        frozenset(
            six.moves.reduce(
                lambda x, y: x.union(y),
                map(operator.attrgetter('implied'), interfaces),
                set()
            )
        )
    )