code: def reset(self):
          
          self.curr_idx = 0
          #shuffle data in each bucket
          random.shuffle(self.idx)
          for i, buck in enumerate(self.sentences):
              self.indices[i], self.sentences[i], self.characters[i], self.label[i] = shuffle(self.indices[i],
                                                                                              self.sentences[i],
                                                                                              self.characters[i],
                                                                                              self.label[i])
  
          self.ndindex = []
          self.ndsent = []
          self.ndchar = []
          self.ndlabel = []
  
          #for each bucket of data
          for i, buck in enumerate(self.sentences):
              #append the lists with an array
              self.ndindex.append(ndarray.array(self.indices[i], dtype=self.dtype))
              self.ndsent.append(ndarray.array(self.sentences[i], dtype=self.dtype))
              self.ndchar.append(ndarray.array(self.characters[i], dtype=self.dtype))
              self.ndlabel.append(ndarray.array(self.label[i], dtype=self.dtype))
docs: Resets the iterator to the beginning of the data.