code: def make_tempdir():
      """Execute a block in a temporary directory and remove the directory and
      its contents at the end of the with block.
  
      YIELDS (Path): The path of the temp directory.
      """
      d = Path(tempfile.mkdtemp())
      yield d
      shutil.rmtree(str(d))
  
imports: from typing import List, Dict, Union, Set
  from pathlib import Path
  import random
  from transformers import AutoModel, AutoTokenizer
  from transformers.tokenization_utils import BatchEncoding
  from transformers.tokenization_utils_fast import PreTrainedTokenizerFast
  import catalogue
  from spacy.util import registry
  from thinc.api import get_torch_default_device
  import torch.cuda
  import tempfile
  import shutil
  import contextlib
  import warnings
label_desc: Use image node_id 8 for calling a global function with example usage: make_tempdir() without return types