nodes: 0, module; 1, function_definition; 2, function_name:sort; 3, parameters; 4, block; 5, identifier:self; 6, identifier:key; 7, list_splat_pattern; 8, default_parameter; 9, default_parameter; 10, default_parameter; 11, default_parameter; 12, default_parameter; 13, default_parameter; 14, expression_statement; 15, expression_statement; 16, if_statement; 17, if_statement; 18, if_statement; 19, if_statement; 20, if_statement; 21, if_statement; 22, return_statement; 23, identifier:get_patterns; 24, identifier:by; 25, None; 26, identifier:offset; 27, None; 28, identifier:count; 29, None; 30, identifier:asc; 31, None; 32, identifier:alpha; 33, False; 34, identifier:store; 35, None; 36, comment:"""Sort the elements in a list, set or sorted set."""; 37, assignment; 38, comparison_operator:by is not None; 39, block; 40, boolean_operator; 41, block; 42, identifier:get_patterns; 43, block; 44, comparison_operator:asc is not None; 45, block; 46, identifier:alpha; 47, block; 48, comparison_operator:store is not None; 49, block; 50, call; 51, identifier:args; 52, list; 53, identifier:by; 54, None; 55, expression_statement; 56, comparison_operator:offset is not None; 57, comparison_operator:count is not None; 58, expression_statement; 59, expression_statement; 60, identifier:asc; 61, None; 62, expression_statement; 63, expression_statement; 64, identifier:store; 65, None; 66, expression_statement; 67, attribute; 68, argument_list; 69, augmented_assignment; 70, identifier:offset; 71, None; 72, identifier:count; 73, None; 74, augmented_assignment; 75, augmented_assignment; 76, augmented_assignment; 77, augmented_assignment; 78, augmented_assignment; 79, identifier:self; 80, identifier:execute; 81, string; 82, identifier:key; 83, list_splat; 84, identifier:args; 85, list; 86, identifier:args; 87, list; 88, identifier:args; 89, call; 90, identifier:args; 91, list; 92, identifier:args; 93, list; 94, identifier:args; 95, list; 96, string_content:SORT; 97, identifier:args; 98, string; 99, identifier:by; 100, string; 101, identifier:offset; 102, identifier:count; 103, identifier:sum; 104, argument_list; 105, boolean_operator; 106, string; 107, string; 108, identifier:store; 109, string_content:BY; 110, string_content:LIMIT; 111, generator_expression; 112, list; 113, boolean_operator; 114, string; 115, string_content:ALPHA; 116, string_content:STORE; 117, list; 118, for_in_clause; 119, comparison_operator:asc is True; 120, string; 121, string_content:DESC; 122, string; 123, identifier:pattern; 124, identifier:pattern; 125, identifier:get_patterns; 126, identifier:asc; 127, True; 128, string_content:ASC; 129, string_content:GET
code: def sort(self, key, *get_patterns,
               by=None, offset=None, count=None,
               asc=None, alpha=False, store=None):
          """Sort the elements in a list, set or sorted set."""
          args = []
          if by is not None:
              args += [b'BY', by]
          if offset is not None and count is not None:
              args += [b'LIMIT', offset, count]
          if get_patterns:
              args += sum(([b'GET', pattern] for pattern in get_patterns), [])
          if asc is not None:
              args += [asc is True and b'ASC' or b'DESC']
          if alpha:
              args += [b'ALPHA']
          if store is not None:
              args += [b'STORE', store]
          return self.execute(b'SORT', key, *args)