code: def create_pipeline(context, mode, exclude_classes=()):
      assert mode in ("pyx", "py", "pxd")
      from .Visitor import PrintTree
      from .ParseTreeTransforms import (
          WithTransform,
          NormalizeTree,
          PostParse,
          PxdPostParse,
      )
      from .ParseTreeTransforms import (
          ForwardDeclareTypes,
          InjectGilHandling,
          AnalyseDeclarationsTransform,
      )
      from .ParseTreeTransforms import (
          AnalyseExpressionsTransform,
          FindInvalidUseOfFusedTypes,
      )
      from .ParseTreeTransforms import (
          CreateClosureClasses,
          MarkClosureVisitor,
          DecoratorTransform,
      )
      from .ParseTreeTransforms import (
          TrackNumpyAttributes,
          InterpretCompilerDirectives,
          TransformBuiltinMethods,
      )
      from .ParseTreeTransforms import (
          ExpandInplaceOperators,
          ParallelRangeTransform,
      )
      from .ParseTreeTransforms import CalculateQualifiedNamesTransform
      from .TypeInference import (
          MarkParallelAssignments,
          MarkOverflowingArithmetic,
      )
      from .ParseTreeTransforms import (
          AdjustDefByDirectives,
          AlignFunctionDefinitions,
      )
      from .ParseTreeTransforms import RemoveUnreachableCode, GilCheck
      from .FlowControl import ControlFlowAnalysis
      from .AnalysedTreeTransforms import AutoTestDictTransform
      from .AutoDocTransforms import EmbedSignature
      from .Optimize import (
          FlattenInListTransform,
          SwitchTransform,
          IterationTransform,
      )
      from .Optimize import (
          EarlyReplaceBuiltinCalls,
          OptimizeBuiltinCalls,
      )
      from .Optimize import InlineDefNodeCalls
      from .Optimize import ConstantFolding, FinalOptimizePhase
      from .Optimize import DropRefcountingTransform
      from .Optimize import ConsolidateOverflowCheck
      from .Buffer import IntroduceBufferAuxiliaryVars
      from .ModuleNode import (
          check_c_declarations,
          check_c_declarations_pxd,
      )
  
      if mode == "pxd":
          _check_c_declarations = check_c_declarations_pxd
          _specific_post_parse = PxdPostParse(context)
      else:
          _check_c_declarations = check_c_declarations
          _specific_post_parse = None
  
      if mode == "py":
          _align_function_definitions = AlignFunctionDefinitions(
              context
          )
      else:
          _align_function_definitions = None
  
      # NOTE: This is the "common" parts of the pipeline, which is also
      # code in pxd files. So it will be run multiple times in a
      # compilation stage.
      stages = [
          NormalizeTree(context),
          PostParse(context),
          _specific_post_parse,
          TrackNumpyAttributes(),
          InterpretCompilerDirectives(
              context, context.compiler_directives
          ),
          ParallelRangeTransform(context),
          AdjustDefByDirectives(context),
          WithTransform(context),
          MarkClosureVisitor(context),
          _align_function_definitions,
          RemoveUnreachableCode(context),
          ConstantFolding(),
          FlattenInListTransform(),
          DecoratorTransform(context),
          ForwardDeclareTypes(context),
          InjectGilHandling(),
          AnalyseDeclarationsTransform(context),
          AutoTestDictTransform(context),
          EmbedSignature(context),
          EarlyReplaceBuiltinCalls(context),  ## Necessary?
          TransformBuiltinMethods(context),
          MarkParallelAssignments(context),
          ControlFlowAnalysis(context),
          RemoveUnreachableCode(context),
          # MarkParallelAssignments(context),
          MarkOverflowingArithmetic(context),
          IntroduceBufferAuxiliaryVars(context),
          _check_c_declarations,
          InlineDefNodeCalls(context),
          AnalyseExpressionsTransform(context),
          FindInvalidUseOfFusedTypes(context),
          ExpandInplaceOperators(context),
          IterationTransform(context),
          SwitchTransform(context),
          OptimizeBuiltinCalls(context),  ## Necessary?
          CreateClosureClasses(
              context
          ),  ## After all lookups and type inference
          CalculateQualifiedNamesTransform(context),
          ConsolidateOverflowCheck(context),
          DropRefcountingTransform(),
          FinalOptimizePhase(context),
          GilCheck(),
      ]
      filtered_stages = []
      for s in stages:
          if s.__class__ not in exclude_classes:
              filtered_stages.append(s)
      return filtered_stages
  
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 11 for calling a global function with example usage: create_pipeline(context, mode, exclude_classes) and returns: filtered_stages