<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def sort(self, ascending=True):
 """ Sort all values in this SArray. Sort only works for sarray of type str, int and float, otherwise TypeError will be raised. Creates a new, sorted SArray. Parameters ascending: boolean, optional If true, the sarray values are sorted in ascending order, otherwise, descending order. Returns ------- out: SArray Examples -------- dtype: int Rows: 3 [1, 2, 3] """

        from .sframe import SFrame as _SFrame

        if self.dtype not in (int, float, str, datetime.datetime):
            raise TypeError("Only sarray with type (int, float, str, datetime.datetime) can be sorted")
        sf = _SFrame()
        sf['a'] = self
        return sf.sort('a', ascending)['a']