<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def adjacent(self, other):
 """ Returns True if ranges are directly next to each other but does not overlap. True False The empty set is not adjacent to any set. This is the same as the ``-|-`` operator for two ranges in PostgreSQL. :param other: Range to test against. :return: ``True`` if this range is adjacent with `other`, otherwise ``False``. :raises TypeError: If given argument is of invalid type """


        if not self.is_valid_range(other):
            raise TypeError(
                "Unsupported type to test for inclusion '{0.__class__.__name__}'".format(
                    other))
        # Must return False if either is an empty set
        elif not self or not other:
            return False
        return (
            (self.lower == other.upper and self.lower_inc != other.upper_inc) or
            (self.upper == other.lower and self.upper_inc != other.lower_inc))