class_docstr: A pipe that can be written and read concurrently.
  Works with strings and bytes. Buffers the last written string/bytes only.
code: def read(self, length=-1):
      self._wait_cond.acquire()
      try:
          while self._buf is None and not self._closed:
              self._wait_cond.wait()
  
          if self._buf is None:
              return None
  
          if 0 < length < len(self._buf) - self._offs:
              end = self._offs + length
              buf = self._buf[self._offs : end]
              self._offs = end
          else:
              buf = self._buf[self._offs :]
              self._buf = None
  
          return buf
      finally:
          self._wait_cond.notify_all()
          self._wait_cond.release()
  
imports: import threading
label_desc: Use image node_id 3 for calling the Pipe obj's underlying member method code with example usage: obj.read(length) and returns: buf, None