def from_exir(cls, exir, cut_at_symbols=None):
        """
        Arguments:
            exir: ExportedProgram object representing the model to convert.
            inputs: A list of input types to the graph.
            cut_at_symbols: The list of desired outputs from the graph. Symbols
                must be present in the graph. For debugging use only.
        """
        assert isinstance(
            exir, torch.export.ExportedProgram
        ), f"Input should be an object of type torch.export.ExportedProgram. Provide: {type(exir)}"

        exported_program: torch.export.ExportedProgram = exir
        (
            user_inputs,
            user_outputs,
            params,
            buffers,
            input_name_to_source_buffer_name,
            output_name_to_target_buffer_name,
        ) = extract_io_from_exir_program(exported_program)

        inputs = OrderedDict([(i.name, i) for i in user_inputs])

        # Add outputs, cutting if @cut_at_symbols is set
        if cut_at_symbols is not None:
            outputs = cut_at_symbols
        else:
            outputs = user_outputs

        nodes = []
        for node in exported_program.graph_module.graph.nodes:
            if node.op == "call_function":
                nodes.append(InternalTorchIRNode.from_exir_node(node=node))
            elif node.op == "get_attr":
                name = node.target
                attr = exported_program.graph_module.__getattr__(name)
                # Only handle simple tensor attribute for now
                # There may be unconvertible advanced attributes,
                # e.g. higher-level callables such as "call_delegate"
                if not isinstance(attr, torch.Tensor):
                    raise NotImplementedError("Only torch.Tensor attr handled yet")
                params[name] = attr
            elif node.op == "placeholder":
                continue
            elif node.op == "output":
                continue
            else:
                raise NotImplementedError(f"Nodes of type {node.op} not yet implemented")

        return cls(
            nodes=nodes,
            params=params,
            inputs=inputs,
            outputs=outputs,
            buffers=buffers,
            input_name_to_source_buffer_name=input_name_to_source_buffer_name,
            output_name_to_target_buffer_name=output_name_to_target_buffer_name,
        )

        Arguments:
            exir: ExportedProgram object representing the model to convert.
            inputs: A list of input types to the graph.
            cut_at_symbols: The list of desired outputs from the graph. Symbols
                must be present in the graph. For debugging use only.
        
coremltools/converters/mil/frontend/torch/internal_graph.py