Parses the output of 'docker version --format="{{json .}}"'. Essentially just returns the parsed JSON string,
    like the Docker API does. Fields are slightly different however.

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

def parse_version_output(out):
    """
    Parses the output of 'docker version --format="{{json .}}"'. Essentially just returns the parsed JSON string,
    like the Docker API does. Fields are slightly different however.

    :param out: CLI output.
    :type out: unicode | str
    :return: Parsed result.
    :rtype: dict
    """
    parsed = json.loads(out, encoding='utf-8')
    if parsed:
        return parsed.get('Client', {})
    return {}