@staticmethod
def _escape_unicode_char_xubrace(c, ord=ord):
    """
        Escape a Unicode code point using `\\xHH` (8-bit) or
        `\\u{H....H}` notation.
        """
    n = ord(c)
    if n < 256:
        return '\\x{0:02x}'.format(n)
    return '\\u{{{0:0x}}}'.format(n)
