modified SemanticModel.py