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"]
docstr: Sets the CLEAN_COPY_DIRECTORY environment variable in
  order for subsequent calls to use this directory as base for the
  copies.
docstr_tok: ["Sets","the","CLEAN_COPY_DIRECTORY","environment","variable","in","order","for","subsequent","calls","to","use","this","directory","as","base","for","the","copies","."]
code: def set_clean_copy_environment_variable(
      cls, directory: tp.Union[Path, str]
  ) -> None:
      """Sets the CLEAN_COPY_DIRECTORY environment variable in
      order for subsequent calls to use this directory as base for the
      copies.
      """
      assert Path(directory).exists(), "Directory does not exist"
      os.environ[cls.key] = str(directory)
  
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 1 for calling the TemporaryDirectoryCopy obj's underlying member method code with example usage: obj.set_clean_copy_environment_variable(cls, directory) without return types