'Instantiates a new proxy object, which proxies to a remote
endpoint. This method uses a class reference without
constructor arguments to instantiate the proxy.
Arguments:
target_jid -- the XMPP entity ID hosting the endpoint.
endpoint_cls -- The remote (duck) type.'

def new_proxy(self, target_jid, endpoint_cls):

    try:
        argspec = inspect.getargspec(endpoint_cls.__init__)
        args = ([None] * (len(argspec[0]) - 1))
        result = endpoint_cls(*args)
        Endpoint.__init__(result, self, target_jid)
        return Proxy(result)
    except:
        traceback.print_exc(file=sys.stdout)
