feat(semantic): add SemanticBuilder::with_stats
#5757
Merged
SemanticBuilder::with_stats
#5757