code: def skip_locked(session: Session) -> dict[str, Any]:
      """
      Return kargs for passing to `with_for_update()` suitable for the current DB engine version.
  
      We do this as we document the fact that on DB engines that don't support this construct, we do not
      support/recommend running HA scheduler. If a user ignores this and tries anyway everything will still
      work, just slightly slower in some circumstances.
  
      Specifically don't emit SKIP LOCKED for MySQL < 8, or MariaDB, neither of which support this construct
  
      See https://jira.mariadb.org/browse/MDEV-13115
      """
      dialect = session.bind.dialect
  
      if dialect.name != "mysql" or dialect.supports_for_update_of:
          return {"skip_locked": True}
      else:
          return {}
  
imports: from __future__ import annotations
  import contextlib
  import copy
  import datetime
  import json
  import logging
  from typing import TYPE_CHECKING, Any, Generator, Iterable, overload
  from dateutil import relativedelta
  from sqlalchemy import TIMESTAMP, PickleType, event, nullsfirst, tuple_
  from sqlalchemy.dialects import mysql
  from sqlalchemy.types import JSON, Text, TypeDecorator
  from airflow.configuration import conf
  from airflow.serialization.enums import Encoding
  from airflow.utils.timezone import make_naive, utc
label_desc: Use image node_id 3 for calling a global function with example usage: skip_locked(session) and returns: dict, dict