'Verifies that subordinate is DagInput, PipelineKey, or Pipeline.'

def _validate_subordinate(self, subordinate):

    if isinstance(subordinate, pipeline.Pipeline):
        return subordinate
    if isinstance(subordinate, pipeline.PipelineKey):
        if (not isinstance(subordinate.unit, pipeline.Pipeline)):
            raise InvalidDAGException(('PipelineKey    object    %s    does    not    have    a    valid    Pipeline' % subordinate))
        return subordinate.unit
    if isinstance(subordinate, DagInput):
        return subordinate
    raise InvalidDAGException(('Looking    for    Pipeline,    PipelineKey,    or    DagInput    object,    but    got    %s' % type(subordinate)))
