code: def _pprint_seq(seq, _nest_lvl=0, max_seq_items=None, **kwds):
      """
      internal. pprinter for iterables. you should probably use pprint_thing()
      rather then calling this directly.
  
      bounds length of printed sequence, depending on options
      """
      if isinstance(seq, set):
          fmt = u("{{{body}}}")
      else:
          fmt = (
              u("[{body}]")
              if hasattr(seq, "__setitem__")
              else u("({body})")
          )
  
      if max_seq_items is False:
          nitems = len(seq)
      else:
          nitems = (
              max_seq_items or get_option("max_seq_items") or len(seq)
          )
  
      s = iter(seq)
      # handle sets, no slicing
      r = [
          pprint_thing(
              next(s),
              _nest_lvl + 1,
              max_seq_items=max_seq_items,
              **kwds,
          )
          for i in range(min(nitems, len(seq)))
      ]
      body = ", ".join(r)
  
      if nitems < len(seq):
          body += ", ..."
      elif isinstance(seq, tuple) and len(seq) == 1:
          body += ","
  
      return fmt.format(body=body)
  
file_path: catboost/contrib/python/pandas/py2/pandas/io/formats/printing.py
imports: import sys
  from pandas.compat import u
  from pandas.core.dtypes.inference import is_sequence
  from pandas import compat
  from pandas.core.config import get_option
label_desc: Use image node_id 4 for calling a global function with example usage: _pprint_seq(seq, _nest_lvl, max_seq_items) and returns: fmt