Setting local roles on dexterity content type

I have a content type and I want to assign local roles 'Contributor','Reader' based on a field but is not working, I can't figure what's wrong
I tried:

def assignRole(self):
    deptGroup = 'cs-'+ str(self.croACAD_ORG) + '-grp'
    self.manage_setLocalRoles(deptGroup, ['Contributor','Reader'])
    self.reindexObjectSecurity()

and

def assignRole(self):
    deptGroup = 'cs-'+ str(self.croACAD_ORG) + '-grp'
    deptGroup = 'cs-grp'
    api.user.grant_roles(username=deptGroup,roles=['Contributor', 'Editor'],)

The usage of grant_roles() makes no sense since you did not specify the context object that should be used to apply the local roles (defaults to plone site root as documented).

Assigning the context did not work neither

api.group.grant_roles(groupname='deptGroup',roles=['Contributor', 'Editor'], obj=self.context)

this is the full file https://pastebin.com/bBPkGMKU