class_docstr: Generates (support, test) pairs for episodic training.
  
  Precomputes all (support, test) pairs at construction. Allows to reduce
  overhead from computation.
class_docstr_tok: ["Generates","(","support",",","test",")","pairs","for","episodic","training",".","Precomputes","all","(","support",",","test",")","pairs","at","construction",".","Allows","to","reduce","overhead","from","computation","."]
docstr: Sample next (support, test) pair.
  
  Return from internal storage.
docstr_tok: ["Sample","next","(","support",",","test",")","pair",".","Return","from","internal","storage","."]
code: def next(self):
      """Sample next (support, test) pair.
  
      Return from internal storage.
      """
      if self.trial_num == self.n_episodes_per_task:
          raise StopIteration
      else:
          task = self.perm_tasks[
              self.task_num
          ]  # Get id from permutation
          # support = self.supports[task][self.trial_num]
          task_supports, task_tests = self.task_episodes[task]
          support, test = (
              task_supports[self.trial_num],
              task_tests[self.trial_num],
          )
          # Increment and update logic
          self.task_num += 1
          if self.task_num == self.n_tasks:
              self.task_num = 0  # Reset
              self.perm_tasks = np.random.permutation(
                  self.tasks
              )  # Permute again
              self.trial_num += 1  # Upgrade trial index
  
          return (task, support, test)
  
imports: import logging
  import time
  import numpy
  from deepchem.data import NumpyDataset
label_desc: Use image node_id 3 for calling the EpisodeGenerator obj's underlying member method code with example usage: obj.next() and returns: task,  support,  test