Optional Python Requirements for Templates

Added support for optional python requirements for templates. Would override error messages in global optional requirements.