Custom Script to remove doc assignments

Hello,

I’m trying to remove the assignments of document using custom script. This is my code but it is not working.

    frappe.ui.form.on('MyDoc', {
	refresh(frm) {
cur_frm.assign_to.remove(cur_frm.doc.owner);
}
}