Adding render_and_extract function to mdrender service
Flake8 corrections