code: def truncate(sequence):
      
      if len(sequence) > LIST_SLICE:
          return ", ".join(sequence[:LIST_SLICE] + ["..."])
      else:
          return ", ".join(sequence)
docs: Create a potentially shortened text display of a list.
  
      Parameters
      ----------
      sequence : list
          An indexable sequence of elements.
  
      Returns
      -------
      str
          The list as a formatted string.