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

def clean_up(self):
        ''' Clean up the socket and log file handles. '''
        self.socket.close()
        for h in self.capture_handlers:
            h['logger'].close()