code: def run_pipeline(pipeline, source, printtree=True):
      from .Visitor import PrintTree
  
      exec_ns = (
          globals().copy()
          if DebugFlags.debug_verbose_pipeline
          else None
      )
  
      def run(phase, data):
          return phase(data)
  
      error = None
      data = source
      try:
          try:
              for phase in pipeline:
                  if phase is not None:
                      if not printtree and isinstance(phase, PrintTree):
                          continue
                      if DebugFlags.debug_verbose_pipeline:
                          t = time()
                          print("Entering pipeline phase %r" % phase)
                          # create a new wrapper for each step to show the name in profiles
                          phase_name = getattr(
                              phase, "__name__", type(phase).__name__
                          )
                          try:
                              run = _pipeline_entry_points[phase_name]
                          except KeyError:
                              exec(
                                  "def %s(phase, data): return phase(data)"
                                  % phase_name,
                                  exec_ns,
                              )
                              run = _pipeline_entry_points[
                                  phase_name
                              ] = exec_ns[phase_name]
                      data = run(phase, data)
                      if DebugFlags.debug_verbose_pipeline:
                          print("    %.3f seconds" % (time() - t))
          except CompileError as err:
              # err is set
              Errors.report_error(err, use_stack=False)
              error = err
      except InternalError as err:
          # Only raise if there was not an earlier error
          if Errors.num_errors == 0:
              raise
          error = err
      except AbortError as err:
          error = err
      return (error, data)
  
imports: from __future__ import absolute_import
  import itertools
  from time import time
  from .None import Errors
  from .None import DebugFlags
  from .None import Options
  from .Errors import CompileError, InternalError, AbortError
  from .None import Naming
label_desc: Use image node_id 17 for calling a global function with example usage: run_pipeline(pipeline, source, printtree) and returns: error,  data, phase