def distribute(included_targets_as_list_size, total_scan_engines_in_pool):
    """Distribute targets to scan engines as evenly as possible.  Generates a list of targets per engine.  For example,
    if there are 13 targets and 3 scan engines, this function will return [5, 4 ,4] - 5 targets for engine1, 4
    targets for engine2, and 4 targets for engine3.

    https://stackanswers.net/questions/distribute-an-integer-amount-by-a-set-of-slots-as-evenly-as-possible
    """

    base, extra = divmod(included_targets_as_list_size, total_scan_engines_in_pool)
    return [base + (i < extra) for i in range(total_scan_engines_in_pool)]