code: def flask_request_to_dict_request(flask_request: LocalProxy) -> dict:
      """Convert flask request to dict request."""
      urllib_url = urlparse(flask_request.url)
  
      return {
          "headers": dict(flask_request.headers),
          "method": flask_request.method,
          "url": {
              "scheme": urllib_url.scheme,
              "netloc": urllib_url.netloc,
              "path": urllib_url.path,
              "params": urllib_url.params,
              "query": dict(parse_qsl(urllib_url.query)),
              "fragment": urllib_url.fragment,
          },
          "body": dict(flask_request.json)
          if flask_request.json
          else {},
      }
  
file_path: nboost/nboost/translators.py
imports: from urllib.parse import ParseResult, urlparse, parse_qsl, urlencode
  import json
  from requests import Response, request
  from flask import Response
  from werkzeug.local import LocalProxy
label_desc: Use image node_id 1 for calling a global function with example usage: flask_request_to_dict_request(flask_request) and returns: dict