def before_rename(self, old, new, merge=False):
		if not self.custom and frappe.session.user != "Administrator":
			frappe.throw(_("DocType can only be renamed by Administrator"))

		self.check_developer_mode()

		self.validate_name(new)

		if merge:
			frappe.throw(_("DocType can not be merged"))
Throw exception if merge. DocTypes cannot be merged.
dataset/ETHPy150Open frappe/frappe/frappe/core/doctype/doctype/doctype.py/DocType.before_rename