<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def add_package(package_name, package_path='templates', encoding='utf-8'):
 """Adds the given package to the template search routine"""

    if not _has_jinja:
        raise RuntimeError(_except_text)
    _jload.add_loader(PackageLoader(package_name, package_path, encoding))