code: def remove_tmp_dir_at_exit():
      """
      Helper method to attempt a deletion of audio file cache on flask api exit.
      Gunicorn and Docker container (based on gunicorn) will delete any remaining files on
      shutdown of the gunicorn server or the docker container.
  
      This is a patch that might not always work for Flask server, but in general should ensure
      that local audio file cache is deleted.
  
      This does *not* impact the model cache. Flask and Gunicorn servers will *never* delete uploaded models.
      Docker container will delete models *only* when the container is killed (since models are uploaded to
      local storage path inside container).
      """
      try:
          uuid = secure_filename(request.cookies.get("uuid", ""))
  
          if uuid is not None or uuid != "":
              cache_dir = os.path.join(
                  os.path.join(app.config[f"UPLOAD_FOLDER"], uuid)
              )
              logging.info(
                  f"Removing cache file for worker : {os.getpid()}"
              )
  
              if os.path.exists(cache_dir):
                  shutil.rmtree(cache_dir, ignore_errors=True)
                  logging.info(f"Deleted tmp folder : {cache_dir}")
  
      except RuntimeError:
          # Working outside of request context (probably shutdown)
          # simply delete entire tmp folder
          shutil.rmtree(
              app.config[f"UPLOAD_FOLDER"], ignore_errors=True
          )
  
imports: import atexit
  import glob
  import os
  import shutil
  import time
  from html import unescape
  from uuid import uuid4
  import model_api
  import torch
  import werkzeug
  from flask import Flask, make_response, render_template, request, url_for
  from flask_cors import CORS
  from werkzeug.utils import secure_filename
  from nemo.utils import logging
label_desc: Use image node_id 7 for calling a global function with example usage: remove_tmp_dir_at_exit() without return types