def _unpad(
        s: str,
) -> str:
    """Unpads a string that was previously padded by _pad().

    :param s: The string to unpad
    :type s: bytes
    :returns: The unpadded string
    :rtype: str
    """
    last_character = s[len(s) - 1:]
    bytes_to_remove = ord(last_character)
    return s[:-bytes_to_remove]