def _generate_overlaps(sequence, order):
    """
    This function takes an input sequence & generates overlapping subsequences
    of length order + 1, returned as a tuple. Has no dependencies & is called
    by the wrapper compute()

    Parameters
    ----------
    sequence : string
        String containing nucleotide sequence.
    order : int
        Order of Markov Transition Probability Matrix for computing overlaps

    Returns
    -------
    tuple
        Contains all overlapping sub-sequences (of length order + 1) for given
        order. Total number of sub-sequences is len(sequence) - (order + 1)

    """
    # Initialize aggregator
    aggregator = []

    # Increment order by 1 as the Markov model includes the current state, such
    # that the length of sequence corresponding to a state is order + 1
    order += 1

    # Iteratively store sequences shifted to the left by 1 step
    for idx in range(order):
        aggregator.append(sequence[idx : idx - order])

    # Join the shifted sequences through element-wise concatenation & return
    return tuple(map("".join, zip(*aggregator)))