def before_training_exp(self, strategy, num_workers=0, shuffle=True, **kwargs):
        """
        Dataloader to build batches containing examples from both memories and
        the training dataset
        """
        if self.ext_mem_list_current_index == 0:
            return

        temp_x_tensors = []
        for elem in self.ext_mem_list_x:
            temp_x_tensors.append(elem.to("cpu"))
        temp_y_tensors = self.ext_mem_list_y.to("cpu")

        memory = list(zip(temp_x_tensors, temp_y_tensors))
        memory_dataset = _make_taskaware_classification_dataset(
            memory, targets=temp_y_tensors.tolist()
        )

        strategy.dataloader = ReplayDataLoader(
            strategy.adapted_dataset,
            memory_dataset,
            oversample_small_tasks=True,
            num_workers=num_workers,
            batch_size=strategy.train_mb_size,
            shuffle=shuffle,
        )

        Dataloader to build batches containing examples from both memories and
        the training dataset
        
avalanche/training/plugins/gss_greedy.py