nodes: 0, module; 1, function_definition; 2, function_name:sort; 3, parameters; 4, block; 5, identifier:self; 6, default_parameter; 7, expression_statement; 8, import_from_statement; 9, if_statement; 10, expression_statement; 11, expression_statement; 12, return_statement; 13, identifier:ascending; 14, True; 15, comment:"""
          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
          --------
          >>> sa = SArray([3,2,1])
          >>> sa.sort()
          dtype: int
          Rows: 3
          [1, 2, 3]
          """; 16, relative_import; 17, aliased_import; 18, comparison_operator:self.dtype not in (int, float, str, datetime.datetime); 19, block; 20, assignment; 21, assignment; 22, subscript; 23, import_prefix; 24, dotted_name; 25, dotted_name; 26, identifier:_SFrame; 27, attribute; 28, tuple; 29, raise_statement; 30, identifier:sf; 31, call; 32, subscript; 33, identifier:self; 34, call; 35, string; 36, identifier:sframe; 37, identifier:SFrame; 38, identifier:self; 39, identifier:dtype; 40, identifier:int; 41, identifier:float; 42, identifier:str; 43, attribute; 44, call; 45, identifier:_SFrame; 46, argument_list; 47, identifier:sf; 48, string; 49, attribute; 50, argument_list; 51, string_content:a; 52, identifier:datetime; 53, identifier:datetime; 54, identifier:TypeError; 55, argument_list; 56, string_content:a; 57, identifier:sf; 58, identifier:sort; 59, string; 60, identifier:ascending; 61, string:"Only sarray with type (int, float, str, datetime.datetime) can be sorted"; 62, string_content:a
code: 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
          --------
          >>> sa = SArray([3,2,1])
          >>> sa.sort()
          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']