def circular_shift_sample_indices(indices, n_samples_shift, n_samples_total):
    """Shifts sample index values circularly by speficied amount

    :param numpy.ndarray indices: shape (N,) in dtype int
    :param int n_samples_shift: number of samples to shift, can be positive or negative
    :param int n_samples_total: total number of samples in the data
    :return: shifted indices
    :rtype: numpy.ndarray
    """
    return (indices + n_samples_shift) % n_samples_total