code: def _strip_prefix(path, strip_components):
      if not strip_components:
          return path
      p = PurePath(path)
      stripped = str(p.relative_to(*p.parts[:strip_components]))
      return "" if stripped == "." else stripped
  
imports: import errno
  import logging
  import os
  import random
  import shutil
  import stat
  import string
  import sys
  import six
  import libarchive
  import libarchive._libarchive
  from pathlib2 import PurePath
label_desc: Use image node_id 4 for calling a global function with example usage: _strip_prefix(path, strip_components) and returns: unknown, path