def get_template_env(self):
        searchpath = [self.folder]
        if self.template_searchpath:
            searchpath += self.template_searchpath

        env = jinja2.Environment(
            loader=jinja2.FileSystemLoader(searchpath),
            extensions=["jinja2.ext.do"],
            cache_size=0)
        if self.user_defined_macros:
            env.globals.update(self.user_defined_macros)

        return env
Returns a jinja2 Environment while taking into account the DAGs
dataset/ETHPy150Open airbnb/airflow/airflow/models.py/DAG.get_template_env