@staticmethod
def _short_pretty(s):
    if (s is None):
        return None
    if (len(s) < 20):
        return s
    left = s.find('{')
    right = s.rfind('}')
    if ((left == (- 1)) or (right == (- 1)) or (left >= right)):
        return s
    candidate = ((s[0:(left + 1)] + ' ... ') + s[right:])
    if (len(candidate) >= len(s)):
        return s
    return candidate
@staticmethod
def _short_pretty(s):
    if (s is None):
        return None
    if (len(s) < 20):
        return s
    left = s.find('{')
    right = s.rfind('}')
    if ((left == (- 1)) or (right == (- 1)) or (left >= right)):
        return s
    candidate = ((s[0:(left + 1)] + ' ... ') + s[right:])
    if (len(candidate) >= len(s)):
        return s
    return candidate