<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _add(self, xer, primary, type):
 """ Private method for adding a descriptor from the event loop. It takes care of adding it if new or modifying it if already added for another state (read -> read/write for example). """

        if xer not in primary:
            primary[xer] = TwistedSocketNotifier(None, self, xer, type)