docs: def get_variants_in_region(self, chrom, start, end):
          """Iterate over variants in a region."""
          if self.chrom is not None and chrom == self.chrom:
              # We are going to search for 'NA' since the chromosome was set
              chrom = "NA"
  
          iterator = self._bgen.iter_variants_in_region(
              CHROM_STR_DECODE.get(chrom, chrom), start, end,
          )
          for info, dosage in iterator:
              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,
              )