def get_longest_version(versions):
    """Calculate the longest version length.

    :param versions: Dictionary of services and their version numbers.
    :return srv_longest, ver_longest: Tuple containing length of longest
                                      service and version.
    :rtype: tuple
    """
    srv_longest = 0
    ver_longest = 0
    for service, version in versions.items():
        srv_longest = len(service) if len(service
            ) > srv_longest else srv_longest
        ver_longest = len(version) if len(version
            ) > ver_longest else ver_longest
    return srv_longest, ver_longest
