def METHOD_NAME(transaction):
    filters = {
        "bill_no": transaction.bill_no,
        "bill_date": transaction.bill_date,
        "classification": transaction.classification,
        "supplier_gstin": transaction.supplier_gstin,
    }
    if name := frappe.get_value("GST Inward Supply", filters):
        gst_inward_supply = frappe.get_doc("GST Inward Supply", name)
    else:
        gst_inward_supply = frappe.new_doc("GST Inward Supply")
    gst_inward_supply.update(transaction)
    return gst_inward_supply.save(ignore_permissions=True)