Purpose of general _ledger.py inside accounts

I am trying to understand erpnext code and cannot understand when is general_ledger.py is used in accounts. can someone guide me what is its purpose because I understood the one inside reports but not this one. erpnext/general_ledger.py at develop · frappe/erpnext · GitHub this file.

What exactly you need to do? Can you please explain.

Generally speaking: general_ledger.py is part of the payment process and it does functions that are related to what should be placed in the General Ledger (debit and credit) and in case of cancel the invoice or the payment and updating the outstanding amount.