def auto_request_report(fun):
    @wraps(fun)
    def auto_request_report_wrapper(*args, **kwargs):
        """
        Handler function wrapper to automatically report request status to ISY
        """
        request_id = kwargs.get('request_id', None)
        success = fun(*args, **kwargs)

        if request_id and _POLYGLOT_CONNECTION is not None:
            _POLYGLOT_CONNECTION.report_request_status(request_id,
                                                       bool(success))
        return success
    return auto_request_report_wrapper
Python decorator to automate request reporting. Decorated functions must
dataset/ETHPy150Open UniversalDevicesInc/Polyglot/polyglot/nodeserver_api.py/auto_request_report