code: def get_path_from_template(
      path_template: str, path_type: PathType = PathType.AUTO
  ) -> str:
      """Replace tags in the given path template and return either Windows or Linux formatted path."""
      # automatically select path type depending on running OS
      if path_type == PathType.AUTO:
          if platform.system() == "Windows":
              path_type = PathType.WINDOWS
          elif platform.system() == "Linux":
              path_type = PathType.LINUX
          else:
              raise RuntimeError("Unknown platform")
  
      path_template = path_template.replace(
          "<USERNAME>", get_user_name()
      )
  
      # return correctly formatted path
      if path_type == PathType.WINDOWS:
          return str(pathlib.PureWindowsPath(path_template))
      elif path_type == PathType.LINUX:
          return str(pathlib.PurePosixPath(path_template))
      else:
          raise RuntimeError("Unknown platform")
  
imports: import copy
  import inspect
  import os
  import pathlib
  import pickle
  import platform
  import pprint
  import re
  import shutil
  import sys
  import time
  import traceback
  from enum import Enum
  from ..None import util
label_desc: Use image node_id 1 for calling a global function with example usage: get_path_from_template(path_template, path_type) and returns: str, str