def unescape_bytes(bytestr):
    """
    Returns a variant of the given bytestring that has C escapes replaced
    with their ASCII values.

    >>> unescape_bytes(b'\\0')
    b'\x00'
    """
    return bytestr.decode('unicode_escape')