@classmethod
def open_newline_mode(cls, mode):
    """Returns the open() newline mode that best corresponds to the given mode."""
    if mode == cls.N or mode == cls.Unknown:
        return None
    if mode == cls.R:
        return '\r'
    if mode == cls.RN:
        return '\r\n'
    return ''
