code: def testDependencyLoops(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, Type0)
  
          def transform(self, input_object):
              pass
  
      class UnitS(pipeline.Pipeline):
          def __init__(self):
              pipeline.Pipeline.__init__(
                  self, {"a": Type1, "b": Type0}, Type1
              )
  
          def transform(self, input_object):
              pass
  
      class UnitT(pipeline.Pipeline):
          def __init__(self, name="UnitT"):
              pipeline.Pipeline.__init__(self, Type0, Type0, name)
  
          def transform(self, input_object):
              pass
  
      q, r, s, t = UnitQ(), UnitR(), UnitS(), UnitT()
      dag = {
          q: dag_pipeline.DagInput(q.input_type),
          s: {"a": q, "b": r},
          r: s,
          dag_pipeline.DagOutput("output"): r,
          dag_pipeline.DagOutput("output_2"): s,
      }
      with self.assertRaises(dag_pipeline.BadTopologyError):
          dag_pipeline.DAGPipeline(dag)
  
      dag = {
          s: {"a": dag_pipeline.DagInput(Type1), "b": r},
          r: s,
          dag_pipeline.DagOutput("output"): r,
      }
      with self.assertRaises(dag_pipeline.BadTopologyError):
          dag_pipeline.DAGPipeline(dag)
  
      dag = {
          dag_pipeline.DagOutput("output"): dag_pipeline.DagInput(
              Type0
          ),
          t: t,
      }
      with self.assertRaises(dag_pipeline.BadTopologyError):
          dag_pipeline.DAGPipeline(dag)
  
      t2 = UnitT("UnitT2")
      dag = {
          dag_pipeline.DagOutput("output"): dag_pipeline.DagInput(
              Type0
          ),
          t2: t,
          t: t2,
      }
      with self.assertRaises(dag_pipeline.BadTopologyError):
          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 13 for calling the DAGPipelineTest obj's underlying member method code with example usage: obj.testDependencyLoops() without return types