code: def _col_chunks(l, max_rows, row_first=False):
      """Yield successive max_rows-sized column chunks from l."""
      if row_first:
          ncols = (len(l) // max_rows) + (len(l) % max_rows > 0)
          for i in py3compat.xrange(ncols):
              yield [l[j] for j in py3compat.xrange(i, len(l), ncols)]
      else:
          for i in py3compat.xrange(0, len(l), max_rows):
              yield l[i : (i + max_rows)]
  
imports: from __future__ import absolute_import
  import os
  import re
  import sys
  import textwrap
  from string import Formatter
  from IPython.testing.skipdoctest import skip_doctest_py3, skip_doctest
  from IPython.utils import py3compat
label_desc: Use image node_id 11 for calling a global function with example usage: _col_chunks(l, max_rows, row_first) without return types