code: def split_template_path(template: str) -> t.List[str]:
      """Split a path into segments and perform a sanity check.  If it detects
      '..' in the path it will raise a `TemplateNotFound` error.
      """
      pieces = []
      for piece in template.split("/"):
          if (
              os.path.sep in piece
              or (os.path.altsep and os.path.altsep in piece)
              or piece == os.path.pardir
          ):
              raise TemplateNotFound(template)
          elif piece and piece != ".":
              pieces.append(piece)
      return pieces
  
imports: import importlib.util
  import os
  import posixpath
  import sys
  import pkgutil
  import typing
  import weakref
  import zipimport
  from collections import abc
  from hashlib import sha1
  from importlib import import_module
  from types import ModuleType
  from .exceptions import TemplateNotFound
  from .utils import internalcode
  from .utils import open_if_exists
  import __res
label_desc: Use image node_id 1 for calling a global function with example usage: split_template_path(template) and returns: pieces