<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def _registry_update(s, oldid):
        '''
        Internal method used to update an existing socket registry when the socket
        is re-bound to a different local port number.  Requires the socket object
        and old sockid.  Returns None.
        '''
        with _lock:
            sock_queue = ApplicationLayer._to_app.pop(oldid)
            ApplicationLayer._to_app[s._sockid()] = sock_queue