def _get_subset(self, offsets, offsets_start, offsets_end):
        """
        @type offsets: C{list} of C{int} pairs
        @param offsets: List of all offsets
        @type offsets_start: C{int}
        @param offsets_start: start of requested set of offsets
        @type offsets_end: C{int}
        @param offsets_end: end of requested set of offsets
        @return: a list of all offsets between offsets_start and offset_end
        @rtype: C{list} of C{str}
        """
        subset = []
        for i in offsets:
            if (i[0] >= offsets_start and i[1] <= offsets_end and 
                i[0] != i[1]):
                subset.append(i)
            elif (i[0] >= offsets_start and i[1] > offsets_end and 
                i[0] != i[1] and i[0] <= offsets_end):
                subset.append(i)
        return subset
dataset/ETHPy150Open cidles/graf-python/nltk/masc.py/MascCorpusReader._get_subset/original