parameters: (self, data)
docstring: Thread safe writing (uses lock)
docstring_summary: Thread safe writing (uses lock)
docstring_tokens: Thread safe writing ( uses lock )
function: def write(self, data):
          """Thread safe writing (uses lock)"""
          with self._lock:
              self.serial.write(data)
function_tokens: def write ( self , data ) : with self . _lock : self . serial . write ( data )