def tau_column(tau, k, j):
    """
    Determine the column index for the non-zero elements of the matrix for a
    particular row `k` and the value of `j` from the Dicke space.

    Parameters
    ----------
    tau: str
        The tau function to check for this `k` and `j`.

    k: int
        The row of the matrix M for which the non zero elements have
        to be calculated.

    j: float
        The value of `j` for this row.
    """
    # In the notes, we indexed from k = 1, here we do it from k = 0
    k = k + 1
    mapping = {
        "tau3": k - (2 * j + 3),
        "tau2": k - 1,
        "tau4": k + (2 * j - 1),
        "tau5": k - (2 * j + 2),
        "tau1": k,
        "tau6": k + (2 * j),
        "tau7": k - (2 * j + 1),
        "tau8": k + 1,
        "tau9": k + (2 * j + 1),
    }
    # we need to decrement k again as indexing is from 0
    return int(mapping[tau] - 1)