def METHOD_NAME(self, x: object) -> str:
    try:
        if self.use_ascii:
            s = ascii(x)
        else:
            s = super().METHOD_NAME(x)
    except (KeyboardInterrupt, SystemExit):
        raise
    except BaseException as exc:
        s = _format_repr_exception(exc, x)
    if self.maxsize is not None:
        s = _ellipsize(s, self.maxsize)
    return s