code: def all_parents(path, upper_limit=None, cwd=None):
      if not cwd:
          cwd = os.getcwd()
  
      path_abs = os.path.join(cwd, path)
  
      if upper_limit:
          upper_limit = os.path.join(cwd, upper_limit)
  
      result = []
      while path_abs and path_abs != upper_limit:
          (head, tail) = os.path.split(path)
          path = os.path.join(path, "..")
          result.append(path)
          path_abs = head
  
      if upper_limit and path_abs != upper_limit:
          raise BaseException(
              "'%s' is not a prefix of '%s'" % (upper_limit, path)
          )
  
      return result
  
imports: import os.path
  from utility import to_seq
  from glob import glob
  from b2.util import bjam_signature
label_desc: Use image node_id 10 for calling a global function with example usage: all_parents(path, upper_limit, cwd) and returns: result