code: def write(self, handle, flags, data, timeout_ms):
          
          if not isinstance(handle, baseinteger):
              raise TypeError("handle can only be an instance of type baseinteger")
          if not isinstance(flags, baseinteger):
              raise TypeError("flags can only be an instance of type baseinteger")
          if not isinstance(data, list):
              raise TypeError("data can only be an instance of type list")
          for a in data[:10]:
              if not isinstance(a, basestring):
                  raise TypeError(
                          "array can only contain objects of type basestring")
          if not isinstance(timeout_ms, baseinteger):
              raise TypeError("timeout_ms can only be an instance of type baseinteger")
          written = self._call("write",
                       in_p=[handle, flags, data, timeout_ms])
          return written
docs: Writes data to a running process.
  
          in handle of type int
              Handle to write to. Usually 0 is stdin, 1 is stdout and 2 is stderr.
  
          in flags of type int
              A combination of :py:class:`ProcessInputFlag`  flags.
  
          in data of type str
              Array of bytes to write. The size of the array also specifies
              how much to write.
  
          in timeout_ms of type int
              Timeout (in ms) to wait for the operation to complete.
              Pass 0 for an infinite timeout.
  
          return written of type int
              How many bytes were written.