'Helper method to get the data iterator for specified dataset
Arguments:
setname (str): which iterator to return (e.g. \'train\', \'valid\')'

def get_iterator(self, setname):

    assert (setname in self.data_dict), ('no    iterator    for    set    %s' % setname)
    return self.data_dict[setname]
