def _version_tuple_to_string(version):
    """Takes a tuple containing version numbers and converts it to string.

    Args:
        version: is a tuple with this form (num1, num2, num3, num4, suffix). 
    Returns:
        a string that represents the input version. It will always add at least
        3 numbers (major.minor.patch), even when their value is zero.
        For example:
            - (1, 1, 0, 0, "") => 1.1.0
            - (2, 3, 4, 5, "") => 2.3.4.5
            - (1, 0, 1, 0, "open") => 1.0.1-open
            - (1, 0, 1, 12, "beta") => 1.0.1-beta.12
    """

    str_ver = "%s" % version[0]
    for v in version[1:3]:
        str_ver += ".%s" % v
    
    if version[4] != "":
        str_ver += "-%s" % version[4]

    if version[3] != 0:
        str_ver += ".%s" % version[3]

    return str_ver