def METHOD_NAME(self, size):
    count = int(size / get_size())
    remainder = size % get_size()
    start = get_rank() * count + min(get_rank(), remainder)
    stop = (get_rank() + 1) * count + min(get_rank() + 1, remainder)
    return int(stop - start)