class_docstr: Essentially represents a multi-step data transformation.
  
  This is the generator function counterpart for DynamicItem (which should be
  used for regular functions).
  
  A GeneratorDynamicItem first takes some arguments and then uses those in
  multiple steps to incrementally compute some values when called.
  
  A typical use-case is a pipeline of transformations on data: e.g. taking in
  text as a string, and first a tokenized version, and then on the second
  call providing an integer-encoded version. This can be used even though the
  integer-encoder needs to be trained on the first outputs.
  
  The main benefit is to be able to define the pipeline in a clear function,
  even if parts of the pipeline depend on others for their initialization.
  
  Example
  -------
  >>> lab2ind = {}
  >>> def text_pipeline(text):
  ...     text = text.lower().strip()
  ...     text = "".join(c for c in text if c.isalpha() or c == " ")
  ...     words = text.split()
  ...     yield words
  ...     encoded = [lab2ind[word] for word in words]
  ...     yield encoded
  >>> item = GeneratorDynamicItem(
  ...         func=text_pipeline,
  ...         takes=["text"],
  ...         provides=["words", "words_encoded"])
  >>> # First create the integer-encoding:
  >>> ind = 1
  >>> for token in item("Is this it? - This is it."):
  ...     if token not in lab2ind:
  ...         lab2ind[token] = ind
  ...         ind += 1
  >>> # Now the integers can be encoded!
  >>> item()
  [1, 2, 3, 2, 1, 3]
class_docstr_tok: ["Essentially","represents","a","multi-step","data","transformation",".","This","is","the","generator","function","counterpart","for","DynamicItem","(","which","should","be","used","for","regular","functions",")",".","A","GeneratorDynamicItem","first","takes","some","arguments","and","then","uses","those","in","multiple","steps","to","incrementally","compute","some","values","when","called",".","A","typical","use-case","is","a","pipeline","of","transformations","on","data",":","e.g",".","taking","in","text","as","a","string",",","and","first","a","tokenized","version",",","and","then","on","the","second","call","providing","an","integer-encoded","version",".","This","can","be","used","even","though","the","integer-encoder","needs","to","be","trained","on","the","first","outputs",".","The","main","benefit","is","to","be","able","to","define","the","pipeline","in","a","clear","function",",","even","if","parts","of","the","pipeline","depend","on","others","for","their","initialization",".","Example","--","--","--","-",">",">",">","lab2ind","=","{","}",">",">",">","def","text_pipeline","(","text",")",":","...","text","=","text.lower","(",")",".strip","(",")","...","text","=","``","''",".join","(","c","for","c","in","text","if","c.isalpha","(",")","or","c","==","``","``",")","...","words","=","text.split","(",")","...","yield","words","...","encoded","=","[","lab2ind","[","word","]","for","word","in","words","]","...","yield","encoded",">",">",">","item","=","GeneratorDynamicItem","(","...","func=text_pipeline",",","...","takes=","[","``","text","''","]",",","...","provides=","[","``","words","''",",","``","words_encoded","''","]",")",">",">",">","#","First","create","the","integer-encoding",":",">",">",">","ind","=","1",">",">",">","for","token","in","item","(","``","Is","this","it","?","-","This","is","it",".","``",")",":","...","if","token","not","in","lab2ind",":","...","lab2ind","[","token","]","=","ind","...","ind","+=","1",">",">",">","#","Now","the","integers","can","be","encoded","!",">",">",">","item","(",")","[","1",",","2",",","3",",","2",",","1",",","3","]"]
docstr: The next keys that this provides, when called.
docstr_tok: ["The","next","keys","that","this","provides",",","when","called","."]
code: def next_provides(self):
      """The next keys that this provides, when called."""
      keys = self.provides[self.num_provided_items]
      # Support multiple yielded values like:
      # @yields("wav_read", ["left_ch", "right_ch"])
      if isinstance(keys, str):
          return [keys]
      else:
          return keys
  
imports: import inspect
  from dataclasses import dataclass
  from speechbrain.utils.depgraph import DependencyGraph
label_desc: Use image node_id 4 for calling the GeneratorDynamicItem obj's underlying member method code with example usage: obj.next_provides() and returns: list, keys