+def wrap_response(response, headers):
+ response_typ = type(response)
+ class WrappedTwitterResponse(TwitterResponse, response_typ):
+ __doc__ = TwitterResponse.__doc__
+
+ def __init__(self, response, headers):
+ response_typ.__init__(self, response)
+ TwitterResponse.__init__(self, headers)
+
+ return WrappedTwitterResponse(response, headers)
+
+
+