class_docstr: A context manager for managing a temporary directory that will be moved
  to a non-temporary location if no exceptions are raised in the context.
  
  Parameters
  ----------
  final_path : str
      The location to move the file when committing.
  *args, **kwargs
      Forwarded to tmp_dir.
  
  Notes
  -----
  The file is moved on __exit__ if there are no exceptions.
  ``working_dir`` uses :func:`dir_util.copy_tree` to move the actual files,
  meaning it has as strong of guarantees as :func:`dir_util.copy_tree`.
class_docstr_tok: ["A","context","manager","for","managing","a","temporary","directory","that","will","be","moved","to","a","non-temporary","location","if","no","exceptions","are","raised","in","the","context",".","Parameters","--","--","--","--","--","final_path",":","str","The","location","to","move","the","file","when","committing",".","*","args",",","*","*","kwargs","Forwarded","to","tmp_dir",".","Notes","--","--","-","The","file","is","moved","on","__exit__","if","there","are","no","exceptions",".","``","working_dir","``","uses",":","func",":","`","dir_util.copy_tree","`","to","move","the","actual","files",",","meaning","it","has","as","strong","of","guarantees","as",":","func",":","`","dir_util.copy_tree","`","."]
docstr: Ensures a subdirectory of the working directory.
  
  Parameters
  ----------
  path_parts : iterable[str]
      The parts of the path after the working directory.
docstr_tok: ["Ensures","a","subdirectory","of","the","working","directory",".","Parameters","--","--","--","--","--","path_parts",":","iterable","[","str","]","The","parts","of","the","path","after","the","working","directory","."]
code: def ensure_dir(self, *path_parts):
      """Ensures a subdirectory of the working directory.
  
      Parameters
      ----------
      path_parts : iterable[str]
          The parts of the path after the working directory.
      """
      path = self.getpath(*path_parts)
      ensure_directory(path)
      return path
  
imports: from collections import MutableMapping
  import errno
  import os
  import pickle
  from distutils import dir_util
  from shutil import rmtree, move
  from tempfile import mkdtemp, NamedTemporaryFile
  import pandas
  from .context_tricks import nop_context
  from .paths import ensure_directory
label_desc: Use image node_id 2 for calling the working_dir obj's underlying member method code with example usage: obj.ensure_dir() and returns: path