def METHOD_NAME(values, to_string=str):
  if len(values) <= 8:
    return repr(values)
  first_values = [to_string(v) for v in values[0:6]]
  last_values = [to_string(v) for v in values[-2:]]
  return '[' + ' '.join(first_values + ['...'] + last_values) + ']'