def METHOD_NAME(*args, **kwargs):
    if len(args) == 1 and len(kwargs) == 0:
        return _torch_reduce_all(fn)(args[0])
    # TODO: autograd.Function doesn't support kwarg
    input, dim, keepdim, dtype = _reduce_dim_args(*args, **kwargs)
    return _torch_reduce_dim(fn)(input, dim, keepdim, dtype)