class_docstr: Represents a get operation on a Pipeline type signature.
  
  If a pipeline instance `my_pipeline` has `output_type`
  {'key_1': Type1, 'key_2': Type2}, then PipelineKey(my_pipeline, 'key_1'),
  represents the output type Type1. And likewise
  PipelineKey(my_pipeline, 'key_2') represents Type2.
  
  Calling __getitem__ on a pipeline will return a PipelineKey instance.
  So my_pipeline['key_1'] returns PipelineKey(my_pipeline, 'key_1'), and so on.
  
  PipelineKey objects are used for assembling a directed acyclic graph of
  Pipeline instances. See dag_pipeline.py.
class_docstr_tok: ["Represents","a","get","operation","on","a","Pipeline","type","signature",".","If","a","pipeline","instance","`","my_pipeline","`","has","`","output_type","`","{","'key_1","'",":","Type1",",","'key_2","'",":","Type2","}",",","then","PipelineKey","(","my_pipeline",",","'key_1","'",")",",","represents","the","output","type","Type1",".","And","likewise","PipelineKey","(","my_pipeline",",","'key_2","'",")","represents","Type2",".","Calling","__getitem__","on","a","pipeline","will","return","a","PipelineKey","instance",".","So","my_pipeline","[","'key_1","'","]","returns","PipelineKey","(","my_pipeline",",","'key_1","'",")",",","and","so","on",".","PipelineKey","objects","are","used","for","assembling","a","directed","acyclic","graph","of","Pipeline","instances",".","See","dag_pipeline.py","."]
code: def __init__(self, unit, key):
      if not isinstance(unit, Pipeline):
          raise ValueError("Cannot take key of non Pipeline %s" % unit)
      if not isinstance(unit.output_type, dict):
          raise KeyError(
              "Cannot take key %s of %s because output type %s is not a dictionary"
              % (key, unit, unit.output_type)
          )
      if key not in unit.output_type:
          raise KeyError(
              "PipelineKey %s is not valid for %s with output type %s"
              % (key, unit, unit.output_type)
          )
      self.key = key
      self.unit = unit
      self.output_type = unit.output_type[key]
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import abc
  import inspect
  import os.path
  from magenta.pipelines import statistics
  import six
  import tensorflow.compat.v1
label_desc: Use image node_id 1 to create a new PipelineKey object from inherited base classes: object with example: obj = PipelineKey(unit, key)