Set Custom role for a user

I am using Plone 4.
How to set custom roles for the current user through code ?
I have created a role "normaluser". Assign role through site setup works fine.

Through code i have used the following. But it is not working.

from Products.CMFCore.utils import getToolByName

membership = getToolByName(self.context,'portal_membership')
cuser = membership.getAuthenticatedMember()

(self.context).manage_setLocalRoles(cuser, ["normaluser"])

By reading the API docs.

http://docs.plone.org/develop/plone/security/local_roles.html

-aj