code: def upload_file():
      referer = request.headers.get("referer")
      redirect_url = referer or url_for("home")
  
      file_ = request.files.get("file")
  
      if not file_ or not file_.filename:
          flash("Please select a file", "warning")
          return redirect(redirect_url)
  
      (name, ext) = os.path.splitext(file_.filename)
      if not ext.lower() == ".csv":
          flash("Bad file type – CSV required", "warning")
          return redirect(redirect_url)
  
      dirpath = tempfile.mkdtemp(prefix="")
      filename = secure_filename(file_.filename)
      file_.save(os.path.join(dirpath, filename))
      return redirect(
          url_for(
              "audit_file", dirname=os.path.basename(dirpath), name=name
          )
      )
  
file_path: aequitas/src/aequitas_webapp/views.py
imports: import itertools
  import os.path
  import tempfile
  import pandas
  from aequitas.fairness import Fairness
  from aequitas.preprocessing import preprocess_input_df
  from aequitas_cli.aequitas_audit import audit
  from aequitas_cli.utils.configs_loader import Configs
  from flask import abort, Markup, request, redirect, url_for, flash, render_template
  from werkzeug.utils import secure_filename
  from .None import app
label_desc: Use image node_id 4 for calling a global function with example usage: upload_file() and returns: redirect, redirect, redirect