code: def create_tmp_file(n):
      tmp_dir = tempfile.mkdtemp(dir="/tmp")
      tmp_path = os.path.join(tmp_dir, "test.txt")
      with open(tmp_path, "wb") as f:
          f.write(os.urandom(n))
      try:
          yield tmp_path
      finally:
          os.remove(tmp_path)
  
file_path: ray/python/ray/tests/test_out_of_disk_space.py
imports: import os
  import platform
  import shutil
  import sys
  import tempfile
  import time
  from contextlib import contextmanager
  import numpy
  import pytest
  import ray
  from ray.util.state import list_cluster_events
label_desc: Use image node_id 3 for calling a global function with example usage: create_tmp_file(n) without return types