import torch


def g_dD(x):
    """Complicated example function defined on interval `[0, 6]`

    Parameters
    ----------
    x : torch.Tensor
        coordinates for evaluation

    Returns
    -------
    torch.Tensor
        function evaluations
    """
    result = x[0] * (x[0] - 6) / 9
    for x_i in x[1:]:
        result *= x_i * (x_i - 6) / 9
    result *= torch.exp(torch.sin(torch.prod(x, dim=0)))
    return result