<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def transaction(self, tx_hash):
 """The transaction details endpoint provides information on a single transaction. `GET /transactions/{hash} <https://www.stellar.org/developers/horizon/reference/endpoints/transactions-single.html>`_ :param str tx_hash: The hex-encoded transaction hash. :return: A single transaction's details. :rtype: dict """

        endpoint = '/transactions/{tx_hash}'.format(tx_hash=tx_hash)
        return self.query(endpoint)