code: def log_error_decorator(f):
      
      @wraps(f)
      def wrapper(*args, **kwds):
          try:
              result = f(*args, **kwds)
              return result
          except KeyboardInterrupt:
              logger.info('Ctrl-C stopped a process.')
          except Exception as e:
              logger.exception(e)
              raise
      return wrapper
docs: Writes exception to log file if occured in decorated function.
  
      This decorator wrapper is needed for multiprocess logging since otherwise
      the python multiprocessing module will obscure the actual line of the error.