<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def removeByIndex(self, index):
 """removes a user from the invitation list by position"""

        if index < len(self._invites) -1 and \
           index >=0:
            self._invites.remove(index)