def get_jacobian_slice(network, layer_idx):
    """Returns the start and end indices of the columns in `J` that correspond
    to the network layer with index `layer_idx`.

    Args:
        network: The network.
        layer_idx (int): The index of the layer.

    Returns:
        (....): Tuple containing:

        - **neuron_index_start**: The index of the first neuron of the layer.
        - **neuron_index_end**: The index of the last neuron of the layer.
    """
    layer_output_dims = [l.weights.shape[0] for l in network.layers]
    neuron_index_start = sum(layer_output_dims[:layer_idx])
    neuron_index_end = sum(layer_output_dims[:(layer_idx + 1)])

    return neuron_index_start, neuron_index_end