<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def overlap(self, other):
 """ Returns True if both ranges share any points. True False This is the same as the ``&&`` operator for two ranges in PostgreSQL. :param other: Range to test against. :return: ``True`` if ranges overlap, otherwise ``False``. :raises TypeError: If `other` is of another type than this range. .. seealso:: If you need to know which part that overlapped, consider using :meth:`~spans.types.Range.intersection`. """


        # Special case for empty ranges
        if not self or not other:
            return False

        if self < other:
            a, b = self, other
        else:
            a, b = other, self

        # We need to explicitly handle unbounded ranges since a.upper and b.lower
        # make the intervals seem adjacent even though they are not
        if a.upper_inf or b.lower_inf:
            return True
        return a.upper > b.lower or a.upper == b.lower and a.upper_inc and b.lower_inc