class_docstr: An Analysis is the application of a particular pipeline of modules to a
  set of images to produce measurements.
  
  Multiprocessing for analyses is handled by multiple layers of threads and
  processes, to keep the GUI responsive and simplify the code.  Threads and
  processes are organized as below.  Display/Interaction requests and
  Exceptions are sent directly to the pipeline listener.
  
  +------------------------------------------------+
  |           CellProfiler GUI/WX thread           |
  |                                                |
  +- Analysis() methods down,  Events/Requests up -+
  |                                                |
  |       AnalysisRunner.interface() thread        |
  |                                                |
  +----------------  Queues  ----------------------+
  |                                                |
  |  AnalysisRunner.jobserver()/announce() threads |
  |                                                |
  +----------------------------------------------- +
  |              zmqrequest.Boundary()             |
  +---------------+----------------+---------------+
  |     Worker    |     Worker     |   Worker      |
  +---------------+----------------+---------------+
  
  Workers are managed by class variables in the AnalysisRunner.
docstr: create an Analysis applying pipeline to a set of images, writing out
  to measurements_filename, optionally starting with previous
  measurements.
code: def __init__(self, pipeline, initial_measurements=None):
      """create an Analysis applying pipeline to a set of images, writing out
      to measurements_filename, optionally starting with previous
      measurements."""
      self.pipeline = pipeline
      initial_measurements = Measurements(copy=initial_measurements)
      self.initial_measurements_buf = (
          initial_measurements.file_contents()
      )
      initial_measurements.close()
      self.debug_mode = False
      self.analysis_in_progress = False
      self.runner = None
  
      self.runner_lock = threading.Lock()
  
file_path: CellProfiler/src/subpackages/core/cellprofiler_core/analysis/_analysis.py
imports: import gc
  import threading
  import uuid
  from ._runner import Runner
  from ..measurement import Measurements
label_desc: Use image node_id 1 to create a new Analysis object  with example: obj = Analysis(pipeline, initial_measurements)