<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def split_by_line(content):
 """Split the given content into a list of items by newline. Both \r\n and \n are supported. This is done since it seems that TTY devices on POSIX systems use \r\n for newlines in some instances. If the given content is an empty string or a string of only whitespace, an empty list will be returned. If the given content does not contain any newlines, it will be returned as the only element in a single item list. Leading and trailing whitespace is remove from all elements returned. :param str content: Content to split by newlines :return: List of items that were separated by newlines. :rtype: list """

    # Make sure we don't end up splitting a string with
    # just a single trailing \n or \r\n into multiple parts.
    stripped = content.strip()

    if not stripped:
        return []
    if '\r\n' in stripped:
        return _strip_all(stripped.split('\r\n'))
    if '\n' in stripped:
        return _strip_all(stripped.split('\n'))
    return _strip_all([stripped])