code: def trunc_list(s: List) -> List:
      
      if len(s) > max_list_size:
          i = max_list_size // 2
          j = i - 1
          s = s[:i] + [ELLIPSIS] + s[-j:]
      return s
docs: Truncate lists to maximum length.