# Path: src/jinja2/utils.py
# class _PassArg(enum.Enum):
#     context = enum.auto()
#     eval_context = enum.auto()
#     environment = enum.auto()
# 
#     @classmethod
#     def from_obj(cls, obj: F) -> t.Optional["_PassArg"]:
#         if hasattr(obj, "jinja_pass_arg"):
#             return obj.jinja_pass_arg  # type: ignore
# 
#         return None
# 
# Path: src/jinja2/utils.py
# def pass_eval_context(f: F) -> F:
#     """Pass the :class:`~jinja2.nodes.EvalContext` as the first argument
#     to the decorated function when called while rendering a template.
#     See :ref:`eval-context`.
# 
#     Can be used on functions, filters, and tests.
# 
#     If only ``EvalContext.environment`` is needed, use
#     :func:`pass_environment`.
# 
#     .. versionadded:: 3.0.0
#         Replaces ``evalcontextfunction`` and ``evalcontextfilter``.
#     """
#     f.jinja_pass_arg = _PassArg.eval_context  # type: ignore
#     return f


import inspect
import typing as t
from functools import WRAPPER_ASSIGNMENTS
from functools import wraps
from .utils import _PassArg
from .utils import pass_eval_context


V = t.TypeVar("V")


def async_variant(normal_func):  # type: ignore
    def decorator(async_func):  # type: ignore
        pass_arg = _PassArg.from_obj(normal_func)
        need_eval_context = pass_arg is None


# Path: src/jinja2/utils.py
# class _PassArg(enum.Enum):
#     context = enum.auto()
#     eval_context = enum.auto()
#     environment = enum.auto()
# 
#     @classmethod
#     def from_obj(cls, obj: F) -> t.Optional["_PassArg"]:
#         if hasattr(obj, "jinja_pass_arg"):
#             return obj.jinja_pass_arg  # type: ignore
# 
#         return None
# 
# Path: src/jinja2/utils.py
# def pass_eval_context(f: F) -> F:
#     """Pass the :class:`~jinja2.nodes.EvalContext` as the first argument
#     to the decorated function when called while rendering a template.
#     See :ref:`eval-context`.
# 
#     Can be used on functions, filters, and tests.
# 
#     If only ``EvalContext.environment`` is needed, use
#     :func:`pass_environment`.
# 
#     .. versionadded:: 3.0.0
#         Replaces ``evalcontextfunction`` and ``evalcontextfilter``.
#     """
#     f.jinja_pass_arg = _PassArg.eval_context  # type: ignore
#     return f


# Path: src/jinja2/async_utils.py
import inspect
import typing as t
from functools import WRAPPER_ASSIGNMENTS
from functools import wraps
from .utils import _PassArg
from .utils import pass_eval_context



V = t.TypeVar("V")


def async_variant(normal_func):  # type: ignore
    def decorator(async_func):  # type: ignore
        pass_arg = _PassArg.from_obj(normal_func)
        need_eval_context = pass_arg is None


        if pass_arg is _PassArg.environment: