def METHOD_NAME(filters):
	purpose_to_exclude = [
		"Material Transfer for Manufacture",
		"Material Transfer",
		"Send to Subcontractor",
	]
	se = frappe.qb.DocType("Stock Entry")
	sle = frappe.qb.DocType("Stock Ledger Entry")
	query = (
		frappe.qb.from_(sle)
		.left_join(se)
		.on(sle.voucher_no == se.name)
		.select(sle.item_code, Abs(Sum(sle.actual_qty)).as_("consumed_qty"))
		.where(
			(sle.actual_qty < 0)
			& (sle.is_cancelled == 0)
			& (sle.voucher_type.notin(["Delivery Note", "Sales Invoice"]))
			& ((se.purpose.isnull()) | (se.purpose.notin(purpose_to_exclude)))
		)
		.groupby(sle.item_code)
	)
	query = get_filtered_query(filters, sle, query)
	consumed_items = query.run(as_dict=True)
	consumed_items_map = {item.item_code: item.consumed_qty for item in consumed_items}
	return consumed_items_map