code: def print_measurements(options):
      """Print the measurements that would be output by a pipeline
  
      This function calls Pipeline.get_measurement_columns() to get the
      measurements that would be output by a pipeline. This can be used in
      a workflow tool or LIMS to find the outputs of a pipeline without
      running it. For instance, someone might want to integrate CellProfiler
      with Knime and write a Knime node that let the user specify a pipeline
      file. The node could then execute CellProfiler with the --measurements
      switch and display the measurements as node outputs.
      """
  
      if options.pipeline_filename is None:
          raise ValueError("Can't print measurements, no pipeline file")
  
      pipeline = Pipeline()
  
      def callback(pipeline, event):
          if isinstance(event, LoadException):
              raise ValueError(
                  "Failed to load %s" % options.pipeline_filename
              )
  
      pipeline.add_listener(callback)
  
      pipeline.load(os.path.expanduser(options.pipeline_filename))
  
      columns = pipeline.get_measurement_columns()
  
      print("--- begin measurements ---")
  
      print("Object,Feature,Type")
  
      for column in columns:
          object_name, feature, data_type = column[:3]
  
          print("%s,%s,%s" % (object_name, feature, data_type))
  
      print("--- end measurements ---")
  
imports: import io
  import json
  import logging
  import logging.config
  import optparse
  import os
  import os.path
  import re
  import sys
  import tempfile
  import urllib.parse
  import h5py
  import matplotlib
  import numpy
  import pkg_resources
  from cellprofiler_core.constants.measurement import EXPERIMENT
  from cellprofiler_core.constants.measurement import GROUP_INDEX
  from cellprofiler_core.constants.measurement import GROUP_NUMBER
  from cellprofiler_core.constants.measurement import IMAGE
  from cellprofiler_core.constants.pipeline import M_PIPELINE, EXIT_STATUS
  from cellprofiler_core.measurement import Measurements
  from cellprofiler_core.object import ObjectSet
  from cellprofiler_core.pipeline import LoadException
  from cellprofiler_core.pipeline import Pipeline
  from cellprofiler_core.preferences import get_image_set_file
  from cellprofiler_core.preferences import get_temporary_directory
  from cellprofiler_core.preferences import set_conserve_memory
  from cellprofiler_core.preferences import set_force_bioformats
  from cellprofiler_core.preferences import set_allow_schema_write
  from cellprofiler_core.preferences import set_always_continue
  from cellprofiler_core.preferences import set_awt_headless
  from cellprofiler_core.preferences import set_data_file
  from cellprofiler_core.preferences import set_default_image_directory
  from cellprofiler_core.preferences import set_default_output_directory
  from cellprofiler_core.preferences import set_headless
  from cellprofiler_core.preferences import set_image_set_file
  from cellprofiler_core.preferences import set_plugin_directory
  from cellprofiler_core.preferences import set_temporary_directory
  from cellprofiler_core.preferences import set_widget_inspector
  from cellprofiler_core.utilities.core.workspace import is_workspace_file
  from cellprofiler_core.utilities.hdf5_dict import HDF5FileList
  from cellprofiler_core.utilities.java import start_java, stop_java
  from cellprofiler_core.utilities.measurement import load_measurements
  from cellprofiler_core.utilities.zmq import join_to_the_boundary
  from cellprofiler_core.worker import aw_parse_args
  from cellprofiler_core.worker import main
  from cellprofiler_core.workspace import Workspace
  from cellprofiler_core.reader import activate_readers
label_desc: Use image node_id 6 for calling a global function with example usage: print_measurements(options) without return types