Iterates over the genotypes for variants using a list of names.

        Args:
            names (list): The list of names for variant extraction.

def iter_variants_by_names(self, names):
        """Iterates over the genotypes for variants using a list of names.

        Args:
            names (list): The list of names for variant extraction.

        """
        if not self.is_parallel:
            yield from super().iter_variants_by_names(names)

        else:
            for info, dosage in self._bgen.iter_variants_by_names(names):
                yield 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,
                )