check if this is upstream of the `other` interval taking the strand of
        the other interval into account
483937
def is_upstream_of(self, other):
        
        if self.chrom != other.chrom: return None
        if getattr(other, "strand", None) == "+":
            return self.end <= other.start
        # other feature is on - strand, so this must have higher start
        return self.start >= other.end
564359
def _gt_from_lt(self, other):
    """"""
    op_result = self.__lt__(other)
    if op_result is NotImplemented:
        return NotImplemented
    return not op_result and self != other
114258
def has_matching_leftmost(self, remote_as):
        """"""
        if not self.value or not remote_as:
            return False

        leftmost_seg = self.path_seg_list[0]
        if leftmost_seg and leftmost_seg[0] == remote_as:
            return True

        return False
96324
def issuperset(self, other):
        """"""
        self._binary_sanity_check(other)
        return set.issuperset(self, other)
118470
def union(self, other, *, ignore_strand=False):
        
        if not ignore_strand:
            self._assert_same_chromosome_and_strand(other)
        interval = deepcopy(self)
        interval.union_update(other)
        return interval
145612
def overlap(self, other):
        """"""
        if self._start < other.end and self._end > other.start:
            return True
        return False
399512
def visit_compare(self, node):
        """"""
        rhs_str = " ".join(
            [
                "%s %s" % (op, self._precedence_parens(node, expr, is_left=False))
                for op, expr in node.ops
            ]
        )
        return "%s %s" % (self._precedence_parens(node, node.left), rhs_str)
524558
def is_in_intervall(value, min_value, max_value, name='variable'):
    
    if not (min_value <= value <= max_value):
        raise ValueError('{}={} is not in [{}, {}]'
                         .format(name, value, min_value, max_value))
76644
def check(self):
        '''  '''
        if self.lastrun + self.interval < time.time():
            return True
        else:
            return False
459707
def contiguous(self, other: "Interval") -> bool:
        
        return not(self.end < other.start or self.start > other.end)
990233
def is_adjacent(self, other: ops.Qid) -> bool:
        """"""
        return (isinstance(other, GridQubit) and
                abs(self.row - other.row) + abs(self.col - other.col) == 1)
579729
def _check_time_series(self, other):
        
        if not isinstance(other, TimeSeries):
            msg = "unsupported operand types(s) for +: %s and %s" % \
                  (type(self), type(other))
            raise TypeError(msg)
247657
def upstream(self, f, n=1):
        
        if f.strand == -1:
            return self.right(f, n)
        return self.left(f, n)
821347
def difference(self, other):
        
        intervals = other if isinstance(other, IntervalSet) else IntervalSet((other,))
        result = IntervalSet()
        for left in self:
            for right in intervals:
                left = left - right
            if isinstance(left, IntervalSet):
                for interval in left:
                    result.add(interval)
            else:
                result.add(left)
        return result
1087380
def union(self, other):
        
        return Interval(min(self.low, other.low), max(self.high, other.high))
880810
def can_overlap(self, contig, strand=None):
        
        return (self.on_contig(contig) and
                (strand is None or self.on_strand(strand)))
770883
def is_entailed_by(self, other):
        
        other = BoolCell.coerce(other)
        if self.value == U or other.value == self.value:
            return True
        return False