code: def Pipe(duplex=True):
      """Return a pair of connected ZConnection objects.
  
      :param duplex: if duplex, then both read and write are allowed on each
          of the returned connection object. Otherwise, the first returned
          connection will be read-only and the second connection will be
          write-only. By default, duplex is enabled.
      """
  
      if duplex:
          d = ProcessDevice("rw", "rw")
      else:
          d = ProcessDevice("r", "w")
      d.start()
  
      if duplex:
          return (
              LazyZConnection(
                  (
                      "rw",
                      d.out_addr,
                  )
              ),
              LazyZConnection(
                  (
                      "rw",
                      d.in_addr,
                  )
              ),
          )
      return (
          LazyZConnection(
              (
                  "r",
                  d.out_addr,
              )
          ),
          LazyZConnection(
              (
                  "w",
                  d.in_addr,
              )
          ),
      )
  
imports: import logging
  import multiprocessing.connection
  import multiprocessing.reduction
  from multiprocessing.util import register_after_fork
  import atexit
  from fiber.process import current_process
  from fiber.backend import get_backend
  from fiber.socket import Socket, ProcessDevice
label_desc: Use image node_id 2 for calling a global function with example usage: Pipe(duplex) and returns: LazyZConnection,  LazyZConnection, LazyZConnection,  LazyZConnection