def annotate_module(
        self,
        module: ScriptModule,
        hierarchy: Tuple[str],
        name: str,
        graph: torch._C.Graph,
    ) -> "ContextManager":
        """
        Creates a context manager for annotating a module.

        Parameters
        ----------
        hierarchy : Tuple[str]
            The hierarchical path of the module.

        name : str
            The name of the module.

        graph : _TorchGraph
            The module graph.

        Returns
        -------
        ContextManager
            A context manager for module annotation.
        """
        return TorchScriptModuleAnnotator.ContextManager(
            annotator=self,
            module=module,
            module_hierarchy=hierarchy,
            module_name=name,
            graph=graph,
        )

        Creates a context manager for annotating a module.

        Parameters
        ----------
        hierarchy : Tuple[str]
            The hierarchical path of the module.

        name : str
            The name of the module.

        graph : _TorchGraph
            The module graph.

        Returns
        -------
        ContextManager
            A context manager for module annotation.
        
coremltools/models/ml_program/experimental/torch/debugging_utils.py