def resolve_semantic_model_for_measure(
        self,
        target_measure_name: str,
        current_project: str,
        node_package: str,
        target_package: Optional[str] = None,
    ) -> Optional[SemanticModel]:
        """Tries to find the SemanticModel that a measure belongs to"""
        candidates = _packages_to_search(current_project, node_package, target_package)

        for pkg in candidates:
            semantic_model = self.semantic_model_by_measure_lookup.find(
                target_measure_name, pkg, self
            )
            # need to return it even if it's disabled so know it's not fully missing
            if semantic_model is not None:
                return semantic_model

        return None
Tries to find the SemanticModel that a measure belongs to
core/dbt/contracts/graph/manifest.py