def format_sample_case(s: str) -> str:
    """format_sample_case convert a string s to a good form as a sample case.

    A good form means that, it use LR instead of CRLF, it has the trailing newline, and it has no superfluous whitespaces.
    """

    if not s.strip():
        return ''
    lines = s.strip().splitlines()
    lines = [line.strip() + '\n' for line in lines]
    return ''.join(lines)