def trace_back_run_history(self, model_id) -> dict[str, dict]:
        """Trace back the run history of a model.

        The trace order: model_id -> parent_model_id1 -> parent_model_id2 -> ...
        """
        rls = OrderedDict()
        while model_id is not None:
            if model_id in rls:
                raise ValueError(f"Loop detected in the run history of model {model_id}")
            rls[model_id] = self.nodes[model_id].pass_run_config
            model_id = self.nodes[model_id].parent_model_id
        return rls
Trace back the run history of a model.

        The trace order: model_id -> parent_model_id1 -> parent_model_id2 -> ...
        
olive/engine/footprint.py