def METHOD_NAME(gst_accounts):
    voucher_types = get_pending_voucher_types(gst_accounts)
    if not voucher_types:
        return
    error_voucher_types = set()
    for voucher_type in voucher_types:
        while True:
            entries = fetch_gl_entries(gst_accounts, voucher_type, error_voucher_types)
            if not entries:
                break
            gstin_voucher_map = get_gstin_wise_vouchers(entries)
            _update_gl_entries(gstin_voucher_map)
            # nosemgrep
            frappe.db.commit()  # commit after every 50000 entries
    if error_voucher_types:
        click.secho(
            "Company GSTIN is now a required field in GL Entry with GST Account. Seems it is missing in your custom doctypes: {0}".format(
                ", ".join(error_voucher_types)
            ),
            fg="red",
        )