def GetTransactionModel(self, transaction):
        try:
            response_body = transaction.GetRawResponseBody().encode("utf-8")
            binary_response = False
        except __HOLE__:
            response_body = base64.b64encode(transaction.GetRawResponseBody())
            binary_response = True
        finally:
            transaction_model = models.Transaction(
                url=transaction.URL,
                scope=transaction.InScope(),
                method=transaction.Method,
                data=transaction.Data,
                time=float(transaction.Time),
                time_human=transaction.TimeHuman,
                local_timestamp=transaction.LocalTimestamp,
                raw_request=transaction.GetRawRequest(),
                response_status=transaction.GetStatus(),
                response_headers=transaction.GetResponseHeaders(),
                response_body=response_body,
                response_size=len(response_body),
                binary_response=binary_response,
                session_tokens=transaction.GetSessionTokens(),
                login=None,
                logout=None)
            return transaction_model
dataset/ETHPy150Open owtf/owtf/framework/db/transaction_manager.py/TransactionManager.GetTransactionModel