code: def testDisjointGraph(self):
      class UnitQ(pipeline.Pipeline):
          def __init__(self):
              pipeline.Pipeline.__init__(self, Type0, Type1)
  
          def transform(self, input_object):
              pass
  
      class UnitR(pipeline.Pipeline):
          def __init__(self):
              pipeline.Pipeline.__init__(
                  self, Type1, {"a": Type2, "b": Type3}
              )
  
          def transform(self, input_object):
              pass
  
      q, r = UnitQ(), UnitR()
      dag = {
          q: dag_pipeline.DagInput(q.input_type),
          dag_pipeline.DagOutput(): r,
      }
      with self.assertRaises(dag_pipeline.NotConnectedError):
          dag_pipeline.DAGPipeline(dag)
  
      q, r = UnitQ(), UnitR()
      dag = {
          q: dag_pipeline.DagInput(q.input_type),
          dag_pipeline.DagOutput(): {"a": q, "b": r["b"]},
      }
      with self.assertRaises(dag_pipeline.NotConnectedError):
          dag_pipeline.DAGPipeline(dag)
  
      # Pipelines that do not output to anywhere are not allowed.
      dag = {
          dag_pipeline.DagOutput("output"): dag_pipeline.DagInput(
              q.input_type
          ),
          q: dag_pipeline.DagInput(q.input_type),
          r: q,
      }
      with self.assertRaises(dag_pipeline.NotConnectedError):
          dag_pipeline.DAGPipeline(dag)
  
      # Pipelines which need to be executed but don't have inputs are not allowed.
      dag = {
          dag_pipeline.DagOutput("output"): dag_pipeline.DagInput(
              q.input_type
          ),
          r: q,
          dag_pipeline.DagOutput(): r,
      }
      with self.assertRaises(dag_pipeline.NotConnectedError):
          dag_pipeline.DAGPipeline(dag)
  
imports: import collections
  from absl.testing import absltest
  from magenta.pipelines import dag_pipeline
  from magenta.pipelines import pipeline
  from magenta.pipelines import statistics
label_desc: Use image node_id 14 for calling the DAGPipelineTest obj's underlying member method code with example usage: obj.testDisjointGraph() without return types