code: def add(
      self,
      namespace: Text,
      pass_cls: Type[AbstractGraphPass],
      override: bool,
      name: Optional[Text],
  ):
      cls_name = pass_cls.__name__ if name is None else name
      pass_id = namespace + "::" + cls_name
      logger.debug(f"Registering pass {pass_id}")
      if pass_id in self.passes and not override:
          raise KeyError(f"Pass {pass_id} already registered.")
      self.passes[pass_id] = pass_cls
  
file_path: coremltools/coremltools/converters/mil/mil/passes/pass_registry.py
imports: import inspect
  from typing import Dict, Optional, Text, Type
  from coremltools import _logger
  from coremltools.converters.mil.mil.passes.graph_pass import AbstractGraphPass
label_desc: Use image node_id 4 for calling the PassRegistry obj's underlying member method code with example usage: obj.add(namespace, pass_cls, override, name) without return types