<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 """ Abbreviate a list, truncating each element and adding an indicator at the end if the whole list was truncated. Set item_max_len to None or 0 not to truncate items. """

  if not items:
    return items
  else:
    shortened = [abbreviate_str("%s" % item, max_len=item_max_len) for item in items[0:max_items]]
    if len(items) > max_items:
      shortened.append(indicator)
    return joiner.join(shortened)