def _get_publish_exchange(self, headers):
        publish_exchange = None

        if headers in 'headers':
            hds = headers['headers']
            if isinstance(hds, dict):
                publish_exchange = hds.get('reply_exchange')

        if publish_exchange is None:
            publish_exchange = config.rabbitmq['publish_exchange']

        return publish_exchange
dataset/ETHPy150Open comodit/synapse-agent/synapse/task.py/AmqpTask._get_publish_exchange/swapped operands of `in`