code: def get_cookies(self, user: User | None) -> dict[str, str]:
      if user:
          cookies = self.get_auth_cookies(user)
      elif request.cookies:
          cookies = request.cookies
      else:
          cookies = {}
      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 4 for calling the MachineAuthProvider obj's underlying member method code with example usage: obj.get_cookies(user) and returns: cookies