def setup_custom_perms(parent):
 if (not frappe.db.exists(u'Custom DocPerm', dict(parent=parent))):
  copy_perms(parent)
  return True

def setup_custom_perms ( parent ) : if ( not frappe . db . exists ( u'Custom DocPerm' , dict ( parent = parent ) ) ) : copy_perms ( parent ) return True
if custom permssions are not setup for the current doctype .