code: def splitdrive(p):
      """Split a pathname into drive/UNC sharepoint and relative path specifiers.
      Returns a 2-tuple (drive_or_unc, path); either part may be empty.
  
      If you assign
          result = splitdrive(p)
      It is always true that:
          result[0] + result[1] == p
  
      If the path contained a drive letter, drive_or_unc will contain everything
      up to and including the colon.  e.g. splitdrive("c:/dir") returns ("c:", "/dir")
  
      If the path contained a UNC path, the drive_or_unc will contain the host name
      and share up to but not including the fourth directory separator character.
      e.g. splitdrive("//host/computer/dir") returns ("//host/computer", "/dir")
  
      Paths cannot contain both a drive letter and a UNC path.
  
      """
      p = os.fspath(p)
      if len(p) >= 2:
          if isinstance(p, bytes):
              sep = b"\\"
              altsep = b"/"
              colon = b":"
              unc_prefix = b"\\\\?\\UNC\\"
          else:
              sep = "\\"
              altsep = "/"
              colon = ":"
              unc_prefix = "\\\\?\\UNC\\"
          normp = p.replace(altsep, sep)
          if normp[0:2] == sep * 2:
              # UNC drives, e.g. \\server\share or \\?\UNC\server\share
              # Device drives, e.g. \\.\device or \\?\device
              start = 8 if normp[:8].upper() == unc_prefix else 2
              index = normp.find(sep, start)
              if index == -1:
                  return p, p[:0]
              index2 = normp.find(sep, index + 1)
              if index2 == -1:
                  return p, p[:0]
              return p[:index2], p[index2:]
          if normp[1:2] == colon:
              # Drive-letter drives, e.g. X:
              return p[:2], p[2:]
      return p[:0], p
  
imports: import os
  import sys
  import stat
  import genericpath
  from genericpath import *
label_desc: Use image node_id 4 for calling a global function with example usage: splitdrive(p) and returns: p,  p, p,  p, p,  p, p,  p, p,  p