def reduce_to_unit(divider):
    """
    Reduce a repeating divider to the smallest repeating unit possible.

    This function is used by :meth:`make_div`.

    :param divider: The divider.
    :type divider: str
    :return: Smallest repeating unit possible.
    :rtype: str

    :Example: 'XxXxXxX' -> 'Xx'
    """
    for unit_size in range(1, len(divider) // 2 + 1):
        length = len(divider)
        unit = divider[:unit_size]
        divider_item = divider[:unit_size * (length // unit_size)]
        if unit * (length // unit_size) == divider_item:
            return unit
    return divider
