<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def within(self, other):
 """ Tests if this range is within `other`. True True This is the same as the ``self <@ other`` in PostgreSQL. One difference however is that unlike PostgreSQL ``self`` in this can't be a scalar value. :param other: Range to test against. :return: ``True`` if this range is completely within the given range, otherwise ``False``. :raises TypeError: If given range is of the wrong type. .. seealso:: This method is the inverse of :meth:`~spans.types.Range.contains` """


        if not self.is_valid_range(other):
            raise TypeError(
                "Unsupported type to test for inclusion '{0.__class__.__name__}'".format(
                    other))
        return other.contains(self)