Hook for doctype form dashboard

I like the new form “Related Documents” feature of ERPNext 7. You know, the one you see on top of the forms like Sales Order, Customer,etc that links to related doctypes. It’s very intuitive for user to go directly to referencing records of a doctype;

But I can’t seem to be able to find a hook for adding additional doctypes. I can find the configuration in the folder [module]/[doctype]/[doctype]_dashboard.py. But it’s not very ideal to directly edit this.

Ability to hook additional referencing doctypes would be nice. Will this be a new frappe development feature or is there some other way to do this without hook?

Thanks in advance.

For now you will have to edit the [doctype]_dashboard.py directly to add related documents.