code: def truncate(string, index):
      """Truncate a string at index and add ..."""
      if len(string) > index and index > 0:
          string = string[: index - 1] + "…"
      return string
  
imports: from __future__ import division
  import re
  from decimal import Decimal
  from math import ceil, cos, floor, log10, pi, sin
label_desc: Use image node_id 19 for calling a global function with example usage: truncate(string, index) and returns: string