Flask send_file() giving error TypeError: send_file() missing 1 required positional argument: ‘environ’

Solution
from werkzeug.utils import send_file
from flask import send_file
return werkzeug.utils.send_file(
    **_prepare_send_file_kwargs(
        path_or_file=path_or_file,
        environ=request.environ,
        mimetype=mimetype,
        as_attachment=as_attachment,
        download_name=download_name,
        attachment_filename=attachment_filename,
        conditional=conditional,
        etag=etag,
        add_etags=add_etags,
        last_modified=last_modified,
        max_age=max_age,
        cache_timeout=cache_timeout,
    )
from flask import send_file
return send_file('./sessions.csv',mimetype='csv',as_attachment=True, 
   download_name='sessions.csv', environ=request.environ)