def METHOD_NAME(doctype, value):
	doc = frappe.db.exists("Property Setter", {"doc_type": doctype, "property": "autoname"})
	if doc:
		frappe.db.set_value("Property Setter", doc, "value", value)
	else:
		make_property_setter(doctype, "", "autoname", value, "", for_doctype=True)