code: def pipe_sockets(sock1, sock2, timeout):
      """Pipe data from one socket to another and vice-versa."""
      sockets = [sock1, sock2]
      try:
          while True:
              rlist, _, xlist = select.select(
                  sockets, [], sockets, timeout
              )
              if xlist:
                  break
              for sock in rlist:
                  data = sock.recv(8096)
                  if not data:  # disconnected
                      break
                  other = next(s for s in sockets if s is not sock)
                  other.sendall(data)
      except OSError:
          pass
      finally:
          for sock in sockets:
              sock.close()
  
imports: import base64
  import http.server
  import select
  import socket
  import socketserver
  import threading
  from urllib.request import urlopen
label_desc: Use image node_id 1 for calling a global function with example usage: pipe_sockets(sock1, sock2, timeout) without return types