class_docstr: For py2 support of `with tempfile.TemporaryDirectory() as name:`
class_docstr_tok: ["For","py2","support","of","`","with","tempfile.TemporaryDirectory","(",")","as","name",":","`"]
code: def __enter__(self):
      self.name = tempfile.mkdtemp()
      return self.name
  
imports: import os
  import shutil
  import tempfile
  import numpy
  from tensor2tensor.data_generators import allen_brain
  from tensor2tensor.models import image_transformer_2d
  from tensor2tensor.utils import contrib
  import tensorflow.compat.v1
  from tensorflow.compat.v1 import estimator
label_desc: Use image node_id 1 for calling the TemporaryDirectory obj's underlying member method code with example usage: obj.__enter__() and returns: self