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

def write(self, bytestring):
        '''Enqueue the given bytes to be written asychronously'''
        with self._lock:
            if self._closed:
                raise IOError('Writer is closed')
            self._byte_queue.put(bytestring)