'Commit a transaction.
:returns: Method frame from the Tx.Commit-ok response
:rtype: `pika.frame.Method` having `method` attribute of type
`spec.Tx.CommitOk`'

def tx_commit(self):

    with _CallbackResult(self._MethodFrameCallbackResultArgs) as commit_ok_result:
        self._impl.tx_commit(commit_ok_result.set_value_once)
        self._flush_output(commit_ok_result.is_ready)
        return commit_ok_result.value.method_frame
