def get_deriv_indices(grad):
    """
    Returns the indices of the derivatives involved in the grid derivatives

    Examples
    --------
    >>> get_deriv_indices(1)
    ["x", "y", "z"]
    """
    if grad == 0:
        return []
    elif grad == 1:
        return ["x", "y", "z"]
    elif grad == 2:
        return ["x", "y", "z", "xx", "xy", "xz", "yy", "yz", "zz"]
    else:
        raise ValueError("Only grid derivatives up to Hessians is supported (grad=2).")