class_docstr: A directed acyclic graph pipeline.
  
  This Pipeline can be given an arbitrary graph composed of Pipeline instances
  and will run all of those pipelines feeding outputs to inputs. See README.md
  for details.
  
  Use DAGPipeline to compose multiple smaller pipelines together.
class_docstr_tok: ["A","directed","acyclic","graph","pipeline",".","This","Pipeline","can","be","given","an","arbitrary","graph","composed","of","Pipeline","instances","and","will","run","all","of","those","pipelines","feeding","outputs","to","inputs",".","See","README.md","for","details",".","Use","DAGPipeline","to","compose","multiple","smaller","pipelines","together","."]
docstr: Creates valid inputs for the given unit from the outputs in `results`.
  
  Args:
    unit: The `Pipeline` to create inputs for.
    results: A database of computed unit outputs. A dictionary mapping
        Pipeline to list of objects.
    list_operation: A function that maps lists of inputs to a single list of
        tuples, where each tuple is an input. This is used when `unit` takes
        a dictionary as input. Each tuple is used as the values for a
        dictionary input. This can be thought of as taking a sort of
        transpose of a ragged 2D array.
        The default is `itertools.product` which takes the cartesian product
        of the input lists.
  
  Returns:
    If `unit` takes a single input, a list of objects.
    If `unit` takes a dictionary input, a list of dictionaries each mapping
    string name to object.
docstr_tok: ["Creates","valid","inputs","for","the","given","unit","from","the","outputs","in","`","results","`",".","Args",":","unit",":","The","`","Pipeline","`","to","create","inputs","for",".","results",":","A","database","of","computed","unit","outputs",".","A","dictionary","mapping","Pipeline","to","list","of","objects",".","list_operation",":","A","function","that","maps","lists","of","inputs","to","a","single","list","of","tuples",",","where","each","tuple","is","an","input",".","This","is","used","when","`","unit","`","takes","a","dictionary","as","input",".","Each","tuple","is","used","as","the","values","for","a","dictionary","input",".","This","can","be","thought","of","as","taking","a","sort","of","transpose","of","a","ragged","2D","array",".","The","default","is","`","itertools.product","`","which","takes","the","cartesian","product","of","the","input","lists",".","Returns",":","If","`","unit","`","takes","a","single","input",",","a","list","of","objects",".","If","`","unit","`","takes","a","dictionary","input",",","a","list","of","dictionaries","each","mapping","string","name","to","object","."]
code: def _get_inputs_for_unit(
      self, unit, results, list_operation=itertools.product
  ):
      """Creates valid inputs for the given unit from the outputs in `results`.
  
      Args:
        unit: The `Pipeline` to create inputs for.
        results: A database of computed unit outputs. A dictionary mapping
            Pipeline to list of objects.
        list_operation: A function that maps lists of inputs to a single list of
            tuples, where each tuple is an input. This is used when `unit` takes
            a dictionary as input. Each tuple is used as the values for a
            dictionary input. This can be thought of as taking a sort of
            transpose of a ragged 2D array.
            The default is `itertools.product` which takes the cartesian product
            of the input lists.
  
      Returns:
        If `unit` takes a single input, a list of objects.
        If `unit` takes a dictionary input, a list of dictionaries each mapping
        string name to object.
      """
      previous_outputs = self._get_outputs_as_signature(
          self.dag[unit], results
      )
  
      if isinstance(previous_outputs, dict):
          names = list(previous_outputs.keys())
          lists = [previous_outputs[name] for name in names]
          stack = list_operation(*lists)
          return [dict(zip(names, values)) for values in stack]
      else:
          return previous_outputs
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import itertools
  from magenta.pipelines import pipeline
  import six
label_desc: Use image node_id 8 for calling the DAGPipeline obj's underlying member method code with example usage: obj._get_inputs_for_unit(unit, results, list_operation) and returns: unknown, previous_outputs