import random


def uniform_positive_integers_with_sum(count, sum_):
  """Returns list of size `count` of integers >= 1, summing to `sum_`."""
  assert sum_ >= 0
  if count > sum_:
    raise ValueError('Cannot find {} numbers >= 1 with sum {}'
                     .format(count, sum_))
  if count == 0:
    return []
  # Select `count - 1` numbers from {1, ..., sum_ - 1}
  separators = random.sample(list(range(1, sum_)), count - 1)
  separators = sorted(separators)
  return [right - left
          for left, right in zip([0] + separators, separators + [sum_])]