code: def poll(timeout=0.0, map=None):
      if map is None:
          map = socket_map
      if map:
          r = []
          w = []
          e = []
          for fd, obj in list(map.items()):
              is_r = obj.readable()
              is_w = obj.writable()
              if is_r:
                  r.append(fd)
              # accepting sockets should not be writable
              if is_w and not obj.accepting:
                  w.append(fd)
              if is_r or is_w:
                  e.append(fd)
          if [] == r == w == e:
              time.sleep(timeout)
              return
  
          r, w, e = select.select(r, w, e, timeout)
  
          for fd in r:
              obj = map.get(fd)
              if obj is None:
                  continue
              read(obj)
  
          for fd in w:
              obj = map.get(fd)
              if obj is None:
                  continue
              write(obj)
  
          for fd in e:
              obj = map.get(fd)
              if obj is None:
                  continue
              _exception(obj)
  
imports: import select
  import socket
  import sys
  import time
  import warnings
  import os
  from errno import EALREADY, EINPROGRESS, EWOULDBLOCK, ECONNRESET, EINVAL, ENOTCONN, ESHUTDOWN, EISCONN, EBADF, ECONNABORTED, EPIPE, EAGAIN, errorcode
label_desc: Use image node_id 6 for calling a global function with example usage: poll(timeout, map) without return types