Parses the output of the Docker CLI 'docker network ls' and returns it in the format similar to the Docker API.

    :param out: CLI output.
    :type out: unicode | str
    :return: Parsed result.
    :rtype: list[dict]

def parse_networks_output(out):
    """
    Parses the output of the Docker CLI 'docker network ls' and returns it in the format similar to the Docker API.

    :param out: CLI output.
    :type out: unicode | str
    :return: Parsed result.
    :rtype: list[dict]
    """
    if not out:
        return []
    line_iter = islice(out.splitlines(), 1, None)  # Skip header
    return list(map(_network_info, line_iter))