def is_repeating(sequence, period):
    """Returns true if the elements in the sequence repeat with the given
    period.

    Parameters
    ----------
    sequence : sequence
        The sequence of elements to check.

    period : int
        The period over which the elements should repeat.
    """
    seq_len = len(sequence)
    if period <= 1 or period >= seq_len:
        raise ValueError(
            'The period must be greater than one and less than the length of the sequence'
            )
    if seq_len % period != 0:
        raise ValueError(
            'The sequence length is not evenly divisible by the period length.'
            )
    for period_idx in range(1, seq_len // period):
        start_idx = period_idx * period
        end_idx = start_idx + period
        if sequence[start_idx:end_idx] != sequence[:period]:
            return False
    return True
