def _split_integer(value, parts):
        """Divide an integer into equal parts and distribute the remainder"""
        result = [value // parts] * parts
        for i in range(value % parts):
            result[i] += 1
        return result
Divide an integer into equal parts and distribute the remainder
libqtile/layout/xmonad.py