code: def __init__(self, solver, sigint_callback=None):
      """factory to generate signal handler
  
      Inputs::
          - solver: a mystic.solver instance
          - sigint_callback: a callback function
  
      Available switches::
          - sol  --> Print current best solution.
          - cont --> Continue calculation.
          - call --> Executes sigint_callback, if provided.
          - exit --> Exits with current best solution."""
      self.solver = solver
      self.sigint_callback = sigint_callback or solver.sigint_callback
  
imports: from signal import *
label_desc: Use image node_id 1 to create a new Handler object from inherited base classes: object with example: obj = Handler(solver, sigint_callback)