code: def _parents(path):
      """
      Given a path with elements separated by
      posixpath.sep, generate all parents of that path.
  
      >>> list(_parents('b/d'))
      ['b']
      >>> list(_parents('/b/d/'))
      ['/b']
      >>> list(_parents('b/d/f/'))
      ['b/d', 'b']
      >>> list(_parents('b'))
      []
      >>> list(_parents(''))
      []
      """
      return itertools.islice(_ancestry(path), 1, None)
  
imports: import io
  import posixpath
  import zipfile
  import itertools
  import contextlib
  import pathlib
  import re
  from .glob import translate
label_desc: Use image node_id 1 for calling a global function with example usage: _parents(path) and returns: itertools