class_docstr: A ZipFile subclass that ensures that implied directories
  are always included in the namelist.
  
  >>> list(CompleteDirs._implied_dirs(['foo/bar.txt', 'foo/bar/baz.txt']))
  ['foo/', 'foo/bar/']
  >>> list(CompleteDirs._implied_dirs(['foo/bar.txt', 'foo/bar/baz.txt', 'foo/bar/']))
  ['foo/']
class_docstr_tok: ["A","ZipFile","subclass","that","ensures","that","implied","directories","are","always","included","in","the","namelist",".",">",">",">","list","(","CompleteDirs._implied_dirs","(","[","'foo\/bar.txt","'",",","'foo\/bar\/baz.txt","'","]",")",")","[","'foo\/","'",",","'foo\/bar\/","'","]",">",">",">","list","(","CompleteDirs._implied_dirs","(","[","'foo\/bar.txt","'",",","'foo\/bar\/baz.txt","'",",","'foo\/bar\/","'","]",")",")","[","'foo\/","'","]"]
code: def _implied_dirs(names):
      parents = itertools.chain.from_iterable(map(_parents, names))
      as_dirs = (p + posixpath.sep for p in parents)
      return _dedupe(_difference(as_dirs, names))
  
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 the CompleteDirs obj's underlying member method code with example usage: obj._implied_dirs(names) and returns: _dedupe