nodes: 0, module; 1, function_definition; 2, function_name:sort_by; 3, parameters; 4, block; 5, identifier:self; 6, identifier:fieldName; 7, default_parameter; 8, expression_statement; 9, return_statement; 10, identifier:reverse; 11, False; 12, string; 13, call; 14, string_content:sort_by - Return a copy of this collection, sorted by the given fieldName.
  
                The fieldName is accessed the same way as other filtering, so it supports custom properties, etc.
  
                @param fieldName <str> - The name of the field on which to sort by
  
                @param reverse <bool> Default False - If True, list will be in reverse order.
  
                @return <QueryableList> - A QueryableList of the same type with the elements sorted based on arguments.; 15, attribute; 16, argument_list; 17, identifier:self; 18, identifier:__class__; 19, call; 20, identifier:sorted; 21, argument_list; 22, identifier:self; 23, keyword_argument; 24, keyword_argument; 25, identifier:key; 26, lambda; 27, identifier:reverse; 28, identifier:reverse; 29, lambda_parameters; 30, call; 31, identifier:item; 32, attribute; 33, argument_list; 34, identifier:self; 35, identifier:_get_item_value; 36, identifier:item; 37, identifier:fieldName
code: def sort_by(self, fieldName, reverse=False):
          '''
              sort_by - Return a copy of this collection, sorted by the given fieldName.
  
                The fieldName is accessed the same way as other filtering, so it supports custom properties, etc.
  
                @param fieldName <str> - The name of the field on which to sort by
  
                @param reverse <bool> Default False - If True, list will be in reverse order.
  
                @return <QueryableList> - A QueryableList of the same type with the elements sorted based on arguments.
          '''
          return self.__class__(
              sorted(self, key = lambda item : self._get_item_value(item, fieldName), reverse=reverse)
          )