code: def next(self):
          
          if self.row < self.data.num_instances:
              index = self.row
              self.row += 1
              return self.data.get_instance(index)
          else:
              raise StopIteration()
docs: Returns the next row from the Instances object.
  
          :return: the next Instance object
          :rtype: Instance