def reduce_to_unit(divider):
for unit_size in range(<NUM_LIT:1>, len(divider) // <NUM_LIT:2> + <NUM_LIT:1>):<EOL><INDENT>length = len(divider)<EOL>unit = divider[:unit_size]<EOL>divider_item = divider[:unit_size * (length // unit_size)]<EOL>if unit * (length // unit_size) == divider_item:<EOL><INDENT>return unit<EOL><DEDENT><DEDENT>return divider<EOL>
Reduce a repeating divider to the smallest repeating unit possible.

Note: this function is used by make-div
:param divider: the divider
:return: smallest repeating unit possible
:rtype: str

:Example:
'XxXxXxX' -> 'Xx'