def _getPyvcfVariants(
            self, referenceName, startPosition=0, endPosition=2**30):
        localVariants = []
        for variant in self._variantRecords:
            case1 = (variant.start <= startPosition and
                     variant.end > startPosition)
            case2 = (variant.start > startPosition and
                     variant.start < endPosition)
            if (variant.CHROM == referenceName) and (case1 or case2):
                localVariants.append(variant)
        return localVariants
variants with in interval [startPosition, endPosition)
dataset/ETHPy150Open ga4gh/server/tests/datadriven/test_variant_annotations.py/VariantAnnotationSetTest._getPyvcfVariants