nodes: 0, module; 1, function_definition; 2, function_name:data; 3, parameters; 4, block; 5, identifier:self; 6, expression_statement; 7, if_statement; 8, return_statement; 9, comment:"""Return the examples in the dataset in order, sorted, or shuffled."""; 10, attribute; 11, block; 12, elif_clause; 13, else_clause; 14, identifier:xs; 15, identifier:self; 16, identifier:sort; 17, expression_statement; 18, attribute; 19, block; 20, block; 21, assignment; 22, identifier:self; 23, identifier:shuffle; 24, expression_statement; 25, expression_statement; 26, identifier:xs; 27, call; 28, assignment; 29, assignment; 30, identifier:sorted; 31, argument_list; 32, identifier:xs; 33, list_comprehension; 34, identifier:xs; 35, attribute; 36, attribute; 37, keyword_argument; 38, subscript; 39, for_in_clause; 40, identifier:self; 41, identifier:dataset; 42, identifier:self; 43, identifier:dataset; 44, identifier:key; 45, attribute; 46, attribute; 47, identifier:i; 48, identifier:i; 49, call; 50, identifier:self; 51, identifier:sort_key; 52, identifier:self; 53, identifier:dataset; 54, attribute; 55, argument_list; 56, identifier:self; 57, identifier:random_shuffler; 58, call; 59, identifier:range; 60, argument_list; 61, call; 62, identifier:len; 63, argument_list; 64, attribute; 65, identifier:self; 66, identifier:dataset
code: def data(self):
          """Return the examples in the dataset in order, sorted, or shuffled."""
          if self.sort:
              xs = sorted(self.dataset, key=self.sort_key)
          elif self.shuffle:
              xs = [self.dataset[i] for i in self.random_shuffler(range(len(self.dataset)))]
          else:
              xs = self.dataset
          return xs