code: def _wrapper(
      self,
      f: Callable[..., Any],
      action: str | Callable[..., str] | None = None,
      object_ref: str
      | Callable[..., str]
      | Literal[False]
      | None = None,
      allow_extra_payload: bool | None = False,
      **wrapper_kwargs: Any,
  ) -> Callable[..., Any]:
      @functools.wraps(f)
      def wrapper(*args: Any, **kwargs: Any) -> Any:
          action_str = (
              action(*args, **kwargs) if callable(action) else action
          ) or f.__name__
          object_ref_str = (
              object_ref(*args, **kwargs)
              if callable(object_ref)
              else object_ref
          ) or (f.__qualname__ if object_ref is not False else None)
          with self.log_context(
              action=action_str,
              object_ref=object_ref_str,
              **wrapper_kwargs,
          ) as log:
              log(**kwargs)
              if allow_extra_payload:
                  # add a payload updater to the decorated function
                  value = f(*args, add_extra_log_payload=log, **kwargs)
              else:
                  value = f(*args, **kwargs)
          return value
  
      return wrapper
  
imports: from __future__ import annotations
  import functools
  import inspect
  import json
  import logging
  import textwrap
  from abc import ABC, abstractmethod
  from collections.abc import Iterator
  from contextlib import contextmanager
  from datetime import datetime, timedelta
  from typing import Any, Callable, cast, Literal, TYPE_CHECKING
  from flask import current_app, g, request
  from flask_appbuilder.const import API_URI_RIS_KEY
  from sqlalchemy.exc import SQLAlchemyError
  from superset.extensions import stats_logger_manager
  from superset.utils.core import get_user_id, LoggerLevel
label_desc: Use image node_id 7 for calling the AbstractEventLogger obj's underlying member method code with example usage: obj._wrapper(f, action, object_ref, allow_extra_payload) and returns: wrapper, value