Adds :term:`interfaces <interface>` to those already declared as
    implemented by class `cls`.

def add_implemented_interfaces(cls, interfaces):
    """
    Adds :term:`interfaces <interface>` to those already declared as
    implemented by class `cls`.
    """
    implemented = set(
        six.moves.reduce(
            lambda x, y: x.union(y),
            map(operator.attrgetter('implied'), interfaces),
            set()
        )
    )
    implemented.update(*map(
        get_implemented_interfaces,
        inspect.getmro(cls)
    ))
    setattr(cls, '__interfaces__', frozenset(implemented))