code: def get_current_user() -> str | None:
      user = g.user if hasattr(g, "user") and g.user else None
      if user and not user.is_anonymous:
          return user.username
  
      return None
  
imports: from __future__ import annotations
  from typing import TYPE_CHECKING
  from flask import current_app, g
  from superset.tasks.exceptions import ExecutorNotFoundError
  from superset.tasks.types import ExecutorType
label_desc: Use image node_id 2 for calling a global function with example usage: get_current_user() and returns: None, user