Script for Customizing options in the Doctype Link field

I have dynamic Doctype field and link field as shown in https://docs.erpnext.com/docs/v13/user/manual/en/customize-erpnext/articles/dynamic-link-fields

I have added these fields in a child table of Sales Partner.

I need script to limit docTypes list to only [Brand,Item, Territory]