def _decorate_prog_with_default_torch_scope(prog: Program):
        """
        Decorate every op in the program with a default TORCHSCRIPT_MODULE_TYPE scope info.
        """

        def _decorate_block_with_default_torch_scope(block: Block):
            for op in block.operations:
                for b in op.blocks:
                    _decorate_block_with_default_torch_scope(b)
                assert ScopeSource.TORCHSCRIPT_MODULE_TYPE not in op.scopes
                op.scopes[ScopeSource.TORCHSCRIPT_MODULE_TYPE] = ["dummy"]

        for func in prog.functions.values():
            _decorate_block_with_default_torch_scope(func)

        prog._add_essential_scope_source(ScopeSource.TORCHSCRIPT_MODULE_TYPE)

        Decorate every op in the program with a default TORCHSCRIPT_MODULE_TYPE scope info.
        
coremltools/converters/mil/testing_utils.py