    def get_template(self, name, sync=False):
        """
        Return the jinja template object for a given name

        If sync is True, we return a Template that is compiled without async support.
        Only those can be used in synchronous code.

        If sync is False, we return a Template that is compiled with async support
        """
        if sync:
            key = 'jinja2_env_sync'
        else:
            key = 'jinja2_env'
        return self.settings[key].get_template(name)
Return the jinja template object for a given name

If sync is True, we return a Template that is compiled without async support.
Only those can be used in synchronous code.

If sync is False, we return a Template that is compiled with async support
jupyterhub/handlers/base.py