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\/","'","]"]
docstr: If the name represents a directory, return that name
  as a directory (with the trailing slash).
docstr_tok: ["If","the","name","represents","a","directory",",","return","that","name","as","a","directory","(","with","the","trailing","slash",")","."]
code: def resolve_dir(self, name):
      """
      If the name represents a directory, return that name
      as a directory (with the trailing slash).
      """
      names = self._name_set()
      dirname = name + "/"
      dir_match = name not in names and dirname in names
      return dirname if dir_match else name
  
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 4 for calling the CompleteDirs obj's underlying member method code with example usage: obj.resolve_dir(name) and returns: unknown