def METHOD_NAME():
    class A:
        def __repr__(self):
            raise ValueError("...")
    s = saferepr(("*" * 50, A()), maxsize=25)
    assert len(s) == 25
    assert s[0] == "(" and s[-1] == ")"