def add_membership(self, member, role=github.GithubObject.NotSet):
assert isinstance(member, github.NamedUser.NamedUser), member<EOL>assert role is github.GithubObject.NotSet or isinstance(<EOL>role, (str, unicode)), role<EOL>if role is not github.GithubObject.NotSet:<EOL><INDENT>assert role in ['<STR_LIT>', '<STR_LIT>']<EOL>put_parameters = {<EOL>"<STR_LIT>": role,<EOL>}<EOL><DEDENT>else:<EOL><INDENT>put_parameters = {<EOL>"<STR_LIT>": "<STR_LIT>",<EOL>}<EOL><DEDENT>headers, data = self._requester.requestJsonAndCheck(<EOL>"<STR_LIT>",<EOL>self.url + "<STR_LIT>" + member._identity,<EOL>input=put_parameters<EOL>)<EOL>
:calls: `PUT /teams/:id/memberships/:user <http://developer.github.com/v3/orgs/teams>`_
:param member: :class:`github.Nameduser.NamedUser`
:param role: string
:rtype: None