def _get_values_diff(test_type, series, index, ind):
    """
    Gets the difference between two values given a test type.
    :param test_type: one_sided or two_sided
    :param series: Series of values
    :param index: primary index
    :param ind: secondary index
    :return: Difference between 2 values
    """
    if test_type == 'one_sided':
        values_diff = series.loc[index] - series.loc[ind]
    elif test_type == 'two_sided':
        values_diff = abs(series.loc[index] - series.loc[ind])
    else:
        raise ValueError(
            'Test type is unknown: can be either one_sided or two_sided')
    return values_diff
