@classmethod
def compose(cls, exc_type):
    try:
        return cls._composed[exc_type]
    except KeyError:

        class composed_exc_type(exc_type, cls):
            __init__ = cls.__init__
        composed_exc_type.exc_type = exc_type
        composed_exc_type.exctype = exc_type
        composed_exc_type.__name__ = (exc_type.__name__ + '(Remote)')
        composed_exc_type.__module__ = 'exceptions'
        cls._composed[exc_type] = composed_exc_type
        return composed_exc_type
@classmethod
def compose(cls, exc_type):
    try:
        return cls._composed[exc_type]
    except KeyError:

        class composed_exc_type(exc_type, cls):
            __init__ = cls.__init__
        composed_exc_type.exc_type = exc_type
        composed_exc_type.exctype = exc_type
        composed_exc_type.__name__ = (exc_type.__name__ + '(Remote)')
        composed_exc_type.__module__ = 'exceptions'
        cls._composed[exc_type] = composed_exc_type
        return composed_exc_type