code: def get_auth_cookies(user: User) -> dict[str, str]:
      # Login with the user specified to get the reports
      with current_app.test_request_context("/login"):
          login_user(user)
          # A mock response object to get the cookie information from
          response = Response()
          current_app.session_interface.save_session(
              current_app, session, response
          )
  
      cookies = {}
  
      # Grab any "set-cookie" headers from the login response
      for name, value in response.headers:
          if name.lower() == "set-cookie":
              # This yields a MultiDict, which is ordered -- something like
              # MultiDict([('session', 'value-we-want), ('HttpOnly', ''), etc...
              # Therefore, we just need to grab the first tuple and add it to our
              # final dict
              cookie = parse_cookie(value)
              cookie_tuple = list(cookie.items())[0]
              cookies[cookie_tuple[0]] = cookie_tuple[1]
  
      return cookies
  
file_path: superset/superset/utils/machine_auth.py
imports: from __future__ import annotations
  import logging
  from typing import Any, Callable, TYPE_CHECKING
  from urllib.parse import urlparse
  from flask import current_app, Flask, request, Response, session
  from flask_login import login_user
  from selenium.webdriver.remote.webdriver import WebDriver
  from werkzeug.http import parse_cookie
  from superset.utils.class_utils import load_class_from_name
  from superset.utils.urls import headless_url
label_desc: Use image node_id 5 for calling the MachineAuthProvider obj's underlying member method code with example usage: obj.get_auth_cookies(user) and returns: cookies