def get_distribution(data):
    """ Takes a sorted list of numbers and returns a dictionary with the distance as key and the number of appearances
    as value.

    :param data: sorted np array
    :return: dictionary
    """
    distribution = {1: 0, 2: 0, 3: 0}

    for i in range(1, len(data)):
        try:
            distribution[data[i] - data[i-1]] += 1
        except KeyError:
            print('Invalid arrangement')
            return None

    return distribution