import random


def super_sample(list_to_sample, samples):
    """
    Samples from a list. If requested number of samples exceeds the length of the list, it repeats.

    Parameters
    ----------
    list_to_sample : list
        List to sample from.
    samples : integer
        Number of samples to return. May be larger or smaller than the length of list_to_sample.

    Returns
    -------
    List of length samples that contains randomly shuffled samples from the list_to_sample.
    """
    pop = len(list_to_sample)
    if samples > pop:
        result = random.sample(list_to_sample, pop)
        for i in range(samples - pop):
            result.append(random.choice(list_to_sample))
        return result
    else:
        return random.sample(list_to_sample, samples)