def invite_user(self, user=github.GithubObject.NotSet, email=github.GithubObject.NotSet, role=github.GithubObject.NotSet, teams=github.GithubObject.NotSet):
assert user is github.GithubObject.NotSet or isinstance(user, github.NamedUser.NamedUser), user<EOL>assert email is github.GithubObject.NotSet or isinstance(email, (str, unicode)), email<EOL>assert (email is github.GithubObject.NotSet) ^ (user is github.GithubObject.NotSet), "<STR_LIT>"<EOL>parameters = {}<EOL>if user is not github.GithubObject.NotSet:<EOL><INDENT>parameters["<STR_LIT>"] = user.id<EOL><DEDENT>elif email is not github.GithubObject.NotSet:<EOL><INDENT>parameters["<STR_LIT:email>"] = email<EOL><DEDENT>if role is not github.GithubObject.NotSet:<EOL><INDENT>assert isinstance(role, (str, unicode)), role<EOL>assert role in ['<STR_LIT>', '<STR_LIT>', '<STR_LIT>']<EOL>parameters["<STR_LIT>"] = role<EOL><DEDENT>if teams is not github.GithubObject.NotSet:<EOL><INDENT>assert all(isinstance(team, github.Team.Team) for team in teams)<EOL>parameters["<STR_LIT>"] = [t.id for t in teams]<EOL><DEDENT>headers, data = self._requester.requestJsonAndCheck(<EOL>"<STR_LIT:POST>",<EOL>self.url + "<STR_LIT>",<EOL>headers={'<STR_LIT>': Consts.mediaTypeOrganizationInvitationPreview},<EOL>input=parameters<EOL>)<EOL>
:calls: `POST /orgs/:org/invitations <http://developer.github.com/v3/orgs/members>`_
:param user: :class:`github.NamedUser.NamedUser`
:param email: string
:param role: string
:param teams: array of :class:`github.Team.Team`
:rtype: None