def __write_response(self):
        obj = {}
        obj['result'] = self.result

        # log request and result
        self.log.append('request: {}'.format(self.__request))
        self.log.append('result: {}'.format(self.result))

        # log PID of the process
        self.log.append('pid: {}'.format(os.getpid()))

        # log total time taken to process the request
        time_taken = time.time() - self._start_time
        self.log.append('time taken: {:6f}'.format(time_taken))

        # send log to pdns
        if config.BASE['LOG']:
            # pdns would log entries one at a time
            # which can make it hard to read
            # join log entries into a single string
            # response 'log' field must still be an array
            obj['log'] = [ ' '.join(self.log) ]

        # send the response to pdns
        self.__writer.write(json.dumps(obj))
        self.__writer.write('\n')
        self.__writer.flush()
Note this does not work
dataset/ETHPy150Open polaris-gslb/polaris-gslb/polaris_pdns/core/remotebackend.py/RemoteBackend.__write_response--crossover with--dataset/ETHPy150Open eBay/bayesian-belief-networks/bayesian/utils.py/named_base_type_factory