class_docstr: Creates a full copy of a directory inside a temporary directory
  This class can be used as TemporaryDirectory but:
  - the created copy path is available through the copyname attribute
  - the contextmanager returns the clean copy path
  - the directory where the temporary directory will be created
    can be controlled through the CLEAN_COPY_DIRECTORY environment
    variable
class_docstr_tok: ["Creates","a","full","copy","of","a","directory","inside","a","temporary","directory","This","class","can","be","used","as","TemporaryDirectory","but",":","-","the","created","copy","path","is","available","through","the","copyname","attribute","-","the","contextmanager","returns","the","clean","copy","path","-","the","directory","where","the","temporary","directory","will","be","created","can","be","controlled","through","the","CLEAN_COPY_DIRECTORY","environment","variable"]
code: def __init__(
      self,
      source: tp.Union[Path, str],
      dir: tp.Optional[tp.Union[Path, str]] = None,
  ) -> None:
      if dir is None:
          dir = os.environ.get(self.key, None)
      super().__init__(prefix="tmp_clean_copy_", dir=dir)
      self.copyname = Path(self.name) / Path(source).name
      shutil.copytree(str(source), str(self.copyname))
  
imports: import os
  import sys
  import shutil
  import tempfile
  import subprocess
  from pathlib import Path
  import numpy
  from nevergrad.common import typing
label_desc: Use image node_id 2 to create a new TemporaryDirectoryCopy object from inherited base classes: tempfile with example: obj = TemporaryDirectoryCopy(source, dir)