def _union(self, other):
        if other.is_Interval and self._is_comparable(other):
            from sympy.functions.elementary.miscellaneous import Min, Max
            # Non-overlapping intervals
            end = Min(self.end, other.end)
            start = Max(self.start, other.start)
            if (end < start or
               (end == start and (end not in self and end not in other))):
                return None
            else:
                start = Min(self.start, other.start)
                end = Max(self.end, other.end)

                left_open = ((self.start != start or self.left_open) and
                             (other.start != start or other.left_open))
                right_open = ((self.end != end or self.right_open) and
                              (other.end != end or other.right_open))

                return Interval(start, end, left_open, right_open)

        # If I have open end points and these endpoints are contained in other
        if ((self.left_open and sympify(other.contains(self.start)) is S.true) or
                (self.right_open and sympify(other.contains(self.end)) is S.true)):
            # Fill in my end points and return
            open_left = self.left_open and self.start not in other
            open_right = self.right_open and self.end not in other
            new_self = Interval(self.start, self.end, open_left, open_right)
            return set((new_self, other))

        return None
Return the next waiting request, if any.
dataset/ETHPy150Open sympy/sympy/sympy/sets/sets.py/Interval._union--crossover with--dataset/ETHPy150Open brandicted/scrapy-webdriver/scrapy_webdriver/manager.py/WebdriverManager.acquire_next