code: def change_root(new_root, pathname):
      """Return 'pathname' with 'new_root' prepended.  If 'pathname' is
      relative, this is equivalent to "os.path.join(new_root,pathname)".
      Otherwise, it requires making 'pathname' relative and then joining the
      two, which is tricky on DOS/Windows and Mac OS.
      """
      if os.name == "posix":
          if not os.path.isabs(pathname):
              return os.path.join(new_root, pathname)
          else:
              return os.path.join(new_root, pathname[1:])
  
      elif os.name == "nt":
          (drive, path) = os.path.splitdrive(pathname)
          if path[0] == "\\":
              path = path[1:]
          return os.path.join(new_root, path)
  
      raise DistutilsPlatformError(
          f"nothing known about platform '{os.name}'"
      )
  
imports: import importlib.util
  import os
  import re
  import string
  import subprocess
  import sys
  import sysconfig
  import functools
  from .errors import DistutilsPlatformError, DistutilsByteCompileError
  from ._modified import newer
  from .spawn import spawn
  from ._log import log
label_desc: Use image node_id 8 for calling a global function with example usage: change_root(new_root, pathname) and returns: os, os, os