class_docstr: Base class for Operations and BatchOperations.
  
  .. versionadded:: 1.11.0
class_docstr_tok: ["Base","class","for","Operations","and","BatchOperations",".","..","versionadded",":",":","1.11.0"]
docstr: Invoke the given asynchronous callable, passing an asynchronous
  :class:`~sqlalchemy.ext.asyncio.AsyncConnection` as the first
  argument.
  
  This method allows calling async functions from within the
  synchronous ``upgrade()`` or ``downgrade()`` alembic migration
  method.
  
  The async connection passed to the callable shares the same
  transaction as the connection running in the migration context.
  
  Any additional arg or kw_arg passed to this function are passed
  to the provided async function.
  
  .. versionadded: 1.11
  
  .. note::
  
      This method can be called only when alembic is called using
      an async dialect.
docstr_tok: ["Invoke","the","given","asynchronous","callable",",","passing","an","asynchronous",":","class",":","`","~sqlalchemy.ext.asyncio.AsyncConnection","`","as","the","first","argument",".","This","method","allows","calling","async","functions","from","within","the","synchronous","``","upgrade","(",")","``","or","``","downgrade","(",")","``","alembic","migration","method",".","The","async","connection","passed","to","the","callable","shares","the","same","transaction","as","the","connection","running","in","the","migration","context",".","Any","additional","arg","or","kw_arg","passed","to","this","function","are","passed","to","the","provided","async","function",".","..","versionadded",":","1.11","..","note",":",":","This","method","can","be","called","only","when","alembic","is","called","using","an","async","dialect","."]
code: def run_async(
      self,
      async_function: Callable[..., Awaitable[_T]],
      *args: Any,
      **kw_args: Any,
  ) -> _T:
      """Invoke the given asynchronous callable, passing an asynchronous
      :class:`~sqlalchemy.ext.asyncio.AsyncConnection` as the first
      argument.
  
      This method allows calling async functions from within the
      synchronous ``upgrade()`` or ``downgrade()`` alembic migration
      method.
  
      The async connection passed to the callable shares the same
      transaction as the connection running in the migration context.
  
      Any additional arg or kw_arg passed to this function are passed
      to the provided async function.
  
      .. versionadded: 1.11
  
      .. note::
  
          This method can be called only when alembic is called using
          an async dialect.
      """
      if not sqla_compat.sqla_14_18:
          raise NotImplementedError("SQLAlchemy 1.4.18+ required")
      sync_conn = self.get_bind()
      if sync_conn is None:
          raise NotImplementedError("Cannot call run_async in SQL mode")
      if not sync_conn.dialect.is_async:
          raise ValueError("Cannot call run_async with a sync engine")
      from sqlalchemy.ext.asyncio import AsyncConnection
      from sqlalchemy.util import await_only
  
      async_conn = AsyncConnection._retrieve_proxy_for_target(sync_conn)
      return await_only(async_function(async_conn, *args, **kw_args))
  
imports: from __future__ import annotations
  from contextlib import contextmanager
  import re
  import textwrap
  from typing import Any
  from typing import Awaitable
  from typing import Callable
  from typing import Dict
  from typing import Iterator
  from typing import List
  from typing import Mapping
  from typing import NoReturn
  from typing import Optional
  from typing import overload
  from typing import Sequence
  from typing import Tuple
  from typing import Type
  from typing import TYPE_CHECKING
  from typing import TypeVar
  from typing import Union
  from sqlalchemy.sql.elements import conv
  from .None import batch
  from .None import schemaobj
  from ..None import util
  from ..util import sqla_compat
  from ..util.compat import formatannotation_fwdref
  from ..util.compat import inspect_formatargspec
  from ..util.compat import inspect_getfullargspec
  from ..util.sqla_compat import _literal_bindparam
label_desc: Use image node_id 14 for calling the AbstractOperations obj's underlying member method code with example usage: obj.run_async(async_function) and returns: await_only