@frappe.whitelist()
def get_linked_doctypes(doctype):
	return frappe.cache().hget("linked_doctypes", doctype, lambda: _get_linked_doctypes(doctype))
add list of doctypes this doctype is 'linked' with.
dataset/ETHPy150Open frappe/frappe/frappe/desk/form/linked_with.py/get_linked_doctypes