def __next__(self) -> Dict[(str, torch.Tensor)]:
    start = self.current_ind
    end = (self.current_ind + (self.nrollouts * self.rollout_len))
    if (end > self.dataset_size):
        raise StopIteration()
    self.current_ind = end
    return {'masks': torch.from_numpy(self.mask), 'poisoned_door_state': torch.from_numpy(self.initial_observations), 'expert_action': torch.from_numpy(self.expert_actions[start:end].reshape((self.rollout_len, self.nrollouts)))}
def __next__(self) -> Dict[(str, torch.Tensor)]:
    start = self.current_ind
    end = (self.current_ind + (self.nrollouts * self.rollout_len))
    if (end > self.dataset_size):
        raise StopIteration()
    self.current_ind = end
    return {'masks': torch.from_numpy(self.mask), 'poisoned_door_state': torch.from_numpy(self.initial_observations), 'expert_action': torch.from_numpy(self.expert_actions[start:end].reshape((self.rollout_len, self.nrollouts)))}