def METHOD_NAME(self, directory, prepend=False):
    """
    Add a new directory to the template lookup path.
    """
    if prepend:
        self.directories.insert(0, os.path.normpath(directory))
    else:
        self.directories.append(os.path.normpath(directory))
    # Since the lookup path has changed, the compiled modules might be
    # wrong because now "foo.html" might be a completely different template,
    # and "foo.html.py" in the module directory has no way to know that.
    # Update the module_directory argument to point to a directory
    # specifically for this lookup path.
    unique = hashlib.md5((":".join(str(d) for d in self.directories)).encode()).hexdigest()
    self.template_args['module_directory'] = os.path.join(self.__original_module_directory, unique)
    # Also clear the internal caches. Ick.
    self._collection.clear()
    self._uri_cache.clear()