class_docstr: FileTree creates a set of files with their contents in their subdirectories
  and cleans them up later.
class_docstr_tok: ["FileTree","creates","a","set","of","files","with","their","contents","in","their","subdirectories","and","cleans","them","up","later","."]
docstr: Creates a file tree in tempdir with the given filenames and contents.
docstr_tok: ["Creates","a","file","tree","in","tempdir","with","the","given","filenames","and","contents","."]
code: def __init__(
      self, tmp_path: Path, files: Dict[Union[Path, str], str]
  ) -> None:
      """
      Creates a file tree in tempdir with the given filenames and contents.
      """
      self.tmp_path = tmp_path
      self.files = {Path(k): v for k, v in files.items()}
      self.dir = None
  
file_path: determined/harness/tests/filetree.py
imports: import contextlib
  import os
  import shutil
  import tempfile
  from pathlib import Path
  from types import TracebackType
  from typing import ContextManager, Dict, Iterator, Optional, Type, Union
label_desc: Use image node_id 1 to create a new FileTree object from inherited base classes: ContextManager with example: obj = FileTree(tmp_path, files)