class_docstr: Base class for a graph pass.
  
  Each graph pass should be a subclass of this and implement the `apply` method.
  Each graph pass can also implement their own supported options.
  See examples of `skip_ops_by_type` in `add_fp16_cast` and `skip_const_by_size` in
  `const_elimination` about how to support new options in each pass.
docstr: Set pass options.
docstr_tok: ["Set","pass","options","."]
code: def set_options(
      self, pass_options: Optional[List[PassOption]] = None
  ):
      """Set pass options."""
      if pass_options is not None:
          for pass_option in pass_options:
              option_name = pass_option.option_name
              if not hasattr(self, option_name):
                  raise NotImplementedError(
                      f"The graph pass `{self}` doesn't support option `{option_name}`."
                  )
              setattr(self, option_name, pass_option.option_val)
  
file_path: coremltools/coremltools/converters/mil/mil/passes/graph_pass.py
imports: from abc import ABC, abstractmethod
  from typing import Callable, List, Optional, Text, Union
  from coremltools.converters.mil import Operation, Program
label_desc: Use image node_id 4 for calling the AbstractGraphPass obj's underlying member method code with example usage: obj.set_options(pass_options) without return types