Why not just 'import yaml'? And why do this *before* importing 're'?  Most people import standard libraries before nonstandard libraries.