<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def ledger(self, ledger_id):
 """The ledger details endpoint provides information on a single ledger. `GET /ledgers/{sequence} <https://www.stellar.org/developers/horizon/reference/endpoints/ledgers-single.html>`_ :param int ledger_id: The id of the ledger to look up. :return: The details of a single ledger. :rtype: dict """

        endpoint = '/ledgers/{ledger_id}'.format(ledger_id=ledger_id)
        return self.query(endpoint)