code: def pretty_print_list(lst, name="features", repr_format=True):
      """Pretty print a list to be readable."""
      if not lst or len(lst) < 8:
          if repr_format:
              return lst.__repr__()
          else:
              return ", ".join(map(str, lst))
      else:
          topk = ", ".join(map(str, lst[:3]))
          if repr_format:
              lst_separator = "["
              lst_end_separator = "]"
          else:
              lst_separator = ""
              lst_end_separator = ""
  
          return "{start}{topk}, ... {last}{end} (total {size} {name})".format(
              topk=topk,
              last=lst[-1],
              name=name,
              size=len(lst),
              start=lst_separator,
              end=lst_end_separator,
          )
  
file_path: turicreate/src/python/turicreate/toolkits/_feature_engineering/_internal_utils.py
imports: from __future__ import print_function
  from __future__ import division
  from __future__ import absolute_import
  import copy
  from turicreate.util import _raise_error_if_not_of_type
  import logging
  import os
  from six.moves.urllib.request import urlretrieve
  import zipfile
label_desc: Use image node_id 7 for calling a global function with example usage: pretty_print_list(lst, name, repr_format) and returns: str, lst, str