code: def remove_audio_files():
      """
      API Endpoint for removing audio files
  
      # Note: Sometimes data may persist due to set of circumstances:
  
          - User uploads audio then closes app without transcribing anything
  
      In such a case, the files will be deleted when gunicorn shutsdown, or container is stopped.
      However the data may not be automatically deleted if the flast server is used as is.
      """
      # Get the unique cache id from cookie
      uuid = secure_filename(request.cookies.get("uuid", ""))
      data_store = os.path.join(app.config[f"UPLOAD_FOLDER"], uuid)
  
      # If the data does not exist (cache is empty), notify user
      if not os.path.exists(data_store) or uuid == "":
          files_dont_exist = render_template(
              "toast_msg.html",
              toast_message="No files have been uploaded !",
              timeout=2000,
          )
          result = render_template(
              "updates/remove_files.html",
              pre_exec=files_dont_exist,
              url=url_for("remove_audio_files"),
          )
          result = unescape(result)
          return result
  
      else:
          # delete data that exists in cache
          shutil.rmtree(data_store, ignore_errors=True)
  
          logging.info("Removed all data")
  
          # Notify user that cache was deleted.
          toast = render_template(
              "toast_msg.html",
              toast_message="All files removed !",
              timeout=2000,
          )
          result = render_template(
              "updates/remove_files.html",
              pre_exec=toast,
              url=url_for("remove_audio_files"),
          )
          result = unescape(result)
  
          result = make_response(result)
          result.set_cookie("uuid", "", expires=0)
          return result
  
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 5 for calling a global function with example usage: remove_audio_files() and returns: result, result