def arg(arg_idx: int, preprocess: Callable):
    """
    Type utils apply to function arguments.
    Args:
        arg_idx (`int`):
            The index number of the applied argument.
        preprocess (`Callable`):
            The arg preprocess function.
    """
    def decorate(func):
        @ wraps(func)
        def wrapper(*args, **kwargs):
            x = preprocess(args[arg_idx])
            new_args = args[:arg_idx] + (x,) + args[arg_idx + 1:]
            return func(*new_args, **kwargs)
        return wrapper
    return decorate
Type utils apply to function arguments.
Args:
arg_idx (`int`):
The index number of the applied argument.
preprocess (`Callable`):
The arg preprocess function.
towhee/types/arg.py