def compat_middleware_factory(klass):
    class compatwrapper(klass):
        def process_response(self, req, resp):
            if not hasattr(resp, 'streaming'):
                return klass.process_response(self, req, resp)
            return resp
    return compatwrapper
If `base_name` is not specified, attempt to automatically determine
dataset/ETHPy150Open dgraziotin/dycapo/piston/middleware.py/compat_middleware_factory--crossover with--dataset/ETHPy150Open globocom/database-as-a-service/dbaas/api/renderers.py/JSONHalRenderer.get_default_base_name