code: def _fold_sizes(num_rows, num_folds):
      """Generates fold sizes to partition specified number of rows into number of folds.
  
      :param num_rows: number of rows (instances)
      :type num_rows: integer
      :param num_folds: number of folds
      :type num_folds: integer
      :returns: an array.array of fold sizes (of length num_folds)
  
      """
      sizes = array.array("i", [0] * num_folds)
      for i in range(num_folds):
          sizes[i] = int(
              math.floor(float(num_rows - sum(sizes)) / (num_folds - i))
          )
      return sizes
  
imports: import math
  import random
  import itertools
  import functools
  import operator
  import array
  import inspect
label_desc: Use image node_id 4 for calling a global function with example usage: _fold_sizes(num_rows, num_folds) and returns: sizes