code: def prepare_then_cleanup(self):
      with tmp_dir() as tmp_dirpath:
          self._resource_tmp_dir = tmp_dirpath
          self.prepare()
  
          try:
              yield
          finally:
              self._resource_tmp_dir = None
  
imports: from contextlib import contextmanager
  from tests.utils import tmp_dir
label_desc: Use image node_id 1 for calling the BaseExecutor obj's underlying member method code with example usage: obj.prepare_then_cleanup() without return types