Get the genotypes from a well formed variant instance.

        Args:
            marker (Variant): A Variant instance.

        Returns:
            A list of Genotypes instance containing a pointer to the variant as
            well as a vector of encoded genotypes.

def get_variant_genotypes(self, variant):
        """Get the genotypes from a well formed variant instance.

        Args:
            marker (Variant): A Variant instance.

        Returns:
            A list of Genotypes instance containing a pointer to the variant as
            well as a vector of encoded genotypes.

        """
        # The chromosome to search for (if a general one is set, that's the one
        # we need to search for)
        chrom = variant.chrom.name
        if self.chrom is not None and chrom == self.chrom:
            chrom = "NA"

        # Getting the results
        results = []
        iterator = self._bgen.iter_variants_in_region(
            CHROM_STR_DECODE.get(chrom, chrom), variant.pos, variant.pos,
        )
        for info, dosage in iterator:
            if (variant.alleles is None or
                    variant.iterable_alleles_eq([info.a1, info.a2])):
                results.append(Genotypes(
                    Variant(
                        info.name,
                        CHROM_STR_ENCODE.get(info.chrom, info.chrom),
                        info.pos, [info.a1, info.a2],
                    ),
                    dosage,
                    reference=info.a1,
                    coded=info.a2,
                    multiallelic=True,
                ))

        # If there are no results
        if not results:
            logging.variant_name_not_found(variant)

        return results