how can i call a js function from py file in doctype… like need to call function in policy.js from a policy.py
check this if it helps
https://frappeframework.com/docs/v14/user/en/api/realtime