code: def tempdir():
      dir = tempfile.mkdtemp()
      yield dir
      shutil.rmtree(dir)
  
file_path: sagemaker-python-sdk/tests/unit/sagemaker/experiments/test_metrics.py
imports: from __future__ import absolute_import
  import os
  import pytest
  import tempfile
  import shutil
  import datetime
  import dateutil
  import time
  from sagemaker.experiments._metrics import _RawMetricData
label_desc: Use image node_id 1 for calling a global function with example usage: tempdir() without return types