code: def _repr(obj, clip=80):
      '''Clip long repr() string.
      '''
      try:  # safe repr()
          r = repr(obj)
      except TypeError:
          r = 'N/A'
      if 0 < clip < len(r):
          h = (clip // 2) - 2
          if h > 0:
              r = r[:h] + '....' + r[-h:]
      return f _repr(obj, clip=80):
      '''Clip long repr() string.
      '''
      try:  # safe repr()
          r = repr(obj)
      except TypeError:
          r = 'N/A'
      if 0 < clip < len(r):
          h = (clip // 2) - 2
          if h > 0:
              r = r[:h] + '....' + r[-h:]
      return r
docs: Clip long repr() string.