code: def set_output_columns(
      objects, n_partitions, multiplier, n_left_concats, target=None
  ):
      """Set output columns on objects.
  
      Parameters
      ----------
      objects: list
          list of objects to set output columns on
  
      n_partitions: int
          number of partitions created by the indexer.
  
      multiplier: int
          number of columns claimed by each estimator.
          Typically 1, but can also be ``n_classes`` if
          making probability predictions
  
      n_left_concats: int
          number of columns to leave empty for left-concat
  
      target: int, optional
          target number of columns expected to be populated.
          Allows a check to ensure that all columns have been
          assigned.
      """
      col_index = n_left_concats
      col_map = list()
      sorted_learners = {obj.name: obj for obj in objects}
      for _, obj in sorted(sorted_learners.items()):
          col_dict = dict()
  
          for partition_index in range(n_partitions):
              col_dict[partition_index] = col_index
              col_index += multiplier
          col_map.append([obj, col_dict])
  
      if (target) and (col_index != target):
          # Note that since col_index is incremented at the end,
          # the largest index_value we have col_index - 1
          raise ValueError(
              "Mismatch feature size in prediction array (%i) "
              "and max column index implied by learner "
              "predictions sizes (%i)" % (target, col_index - 1)
          )
  
      for obj, col_dict in col_map:
          obj.output_columns = col_dict
  
file_path: mlens/mlens/parallel/_base_functions.py
imports: from __future__ import division
  import os
  import warnings
  from scipy.sparse import issparse
  import numpy
  from ..utils import pickle_load, pickle_save, load
  from ..utils.exceptions import MetricWarning, ParameterChangeWarning
label_desc: Use image node_id 6 for calling a global function with example usage: set_output_columns(objects, n_partitions, multiplier, n_left_concats, target) without return types