code: def get_variants_in_region(self, chrom, start, end):
          
          bim = self.bim.loc[
              (self.bim["chrom"] == CHROM_STR_TO_INT[chrom]) &
              (start <= self.bim["pos"]) &
              (self.bim["pos"] <= end)
          ]
          for i, g in enumerate(self.bed.iter_geno_marker(bim.index)):
              info = bim.iloc[i, :]
              name, geno = g
              yield Genotypes(
                  Variant(info.name, CHROM_INT_TO_STR[info.chrom],
                          info.pos, [info.a1, info.a2]),
                  self._normalize_missing(geno),
                  reference=info.a2,
                  coded=info.a1,
                  multiallelic=info.multiallelic
              )
docs: Iterate over variants in a region.