def resolve_cyvcf2_genotype(cyvcf2_gt):
    """
        Given a genotype given by cyvcf2, translate this to a valid
        genotype string.

        Args:
            cyvcf2_gt (cyvcf2.variant.genotypes)

        Returns:
            genotype (str)
    """

    if cyvcf2_gt[2]:
        separator = "|"
    else:
        separator = "/"
    if cyvcf2_gt[0] == -1:
        a_1 = "."
    else:
        a_1 = str(cyvcf2_gt[0])
    if cyvcf2_gt[1] == -1:
        a_2 = "."
    else:
        a_2 = str(cyvcf2_gt[1])
    genotype = a_1 + separator + a_2

    return genotype