def get_original_func(obj: t.Callable[..., t.Any]) -> t.Callable[..., t.Any]:
    """
    Get the original function from a decorated function
    """
    if getattr(obj, "__is_bentoml_api_func__", False):
        obj = obj.func  # type: ignore
    while isinstance(obj, functools.partial):
        obj = obj.func
    return obj
Get the original function from a decorated function
src/bentoml/_internal/utils/__init__.py