def _pisano_period_len(modulo):
    """
    In number theory, the nth Pisano period, written π(n),
    is the period with which the sequence of Fibonacci numbers taken modulo n repeats.

    Args:
        modulo: modulo

    Returns:
        length of Pisano period
    """
    init_array = [0, 1]
    idx = 1
    while 1:
        idx += 1
        init_array.append(init_array[idx - 1] % modulo + init_array[idx - 2] % modulo)
        if init_array[idx] % modulo == 1 and init_array[idx - 1] % modulo == 0:
            return len(init_array) - 2