code: def _install_handlers(cp, formatters):
      """Install and return handlers"""
      hlist = cp.get("handlers", "keys")
      if not len(hlist):
          return {}
      hlist = hlist.split(",")
      hlist = _strip_spaces(hlist)
      handlers = {}
      fixups = []  # for inter-handler references
      for hand in hlist:
          sectname = "handler_%s" % hand
          klass = cp.get(sectname, "class")
          opts = cp.options(sectname)
          if "formatter" in opts:
              fmt = cp.get(sectname, "formatter")
          else:
              fmt = ""
          try:
              klass = eval(klass, vars(logging))
          except (AttributeError, NameError):
              klass = _resolve(klass)
          args = cp.get(sectname, "args")
          args = eval(args, vars(logging))
          h = klass(*args)
          if "level" in opts:
              level = cp.get(sectname, "level")
              h.setLevel(logging._levelNames[level])
          if len(fmt):
              h.setFormatter(formatters[fmt])
          if issubclass(klass, logging.handlers.MemoryHandler):
              if "target" in opts:
                  target = cp.get(sectname, "target")
              else:
                  target = ""
              if len(
                  target
              ):  # the target handler may not be loaded yet, so keep for later...
                  fixups.append((h, target))
          handlers[hand] = h
      # now all handlers are loaded, fixup inter-handler references...
      for h, t in fixups:
          h.setTarget(handlers[t])
      return handlers
  
imports: import cStringIO
  import errno
  import io
  import logging
  import logging.handlers
  import os
  import re
  import socket
  import struct
  import sys
  import traceback
  import types
  from SocketServer import ThreadingTCPServer, StreamRequestHandler
label_desc: Use image node_id 6 for calling a global function with example usage: _install_handlers(cp, formatters) and returns: handlers, dict