docstr: Apply a pass pipeline to a program, which modifies the program in-place.
docstr_tok: ["Apply","a","pass","pipeline","to","a","program",",","which","modifies","the","program","in-place","."]
code: def apply_pipeline(prog: Program, pass_pipeline: PassPipeline):
      """Apply a pass pipeline to a program, which modifies the program in-place."""
      if pass_pipeline is None:
          raise ValueError("The pass_pipeline cannot be None.")
  
      pass_pipeline.validate()
      prog.validate()
  
      logger.debug(f"Program before {pass_pipeline} pipeline:\n{prog}")
      for pass_name in tqdm(
          pass_pipeline.passes,
          desc=f"Running MIL {pass_pipeline} pipeline",
          unit=" passes",
      ):
          logger.debug(f'Performing pass: "{pass_name}"')
          pass_options = pass_pipeline.get_options(pass_name)
          if pass_options is not None:
              logger.debug(
                  f"The graph pass options for {pass_name} is set to {pass_options}. "
                  f"It will change the pass behavior. Make sure the option is intended."
              )
          graph_pass = PASS_REGISTRY[pass_name]
          graph_pass.set_options(pass_options)
          graph_pass(prog)
          prog.validate()
      logger.debug(f"Program after {pass_pipeline} pipeline:\n{prog}")
  
imports: from __future__ import annotations
  from typing import Dict, List, Optional, Set, Text, Union
  from tqdm import tqdm
  from coremltools import _logger
  from coremltools.converters._profile_utils import _profile
  from coremltools.converters.mil import Program
  from coremltools.converters.mil.mil.passes.graph_pass import PassOption
  from coremltools.converters.mil.mil.passes.helper import classproperty
  from coremltools.converters.mil.mil.passes.pass_registry import PASS_REGISTRY
label_desc: Use image node_id 1 for calling the PassPipelineManager obj's underlying member method code with example usage: obj.apply_pipeline(prog, pass_pipeline) without return types