code: def testNoOutputs(self):
      # Test that empty lists or dicts as intermediate or final outputs don't
      # break anything.
  
      class UnitQ(pipeline.Pipeline):
          def __init__(self):
              pipeline.Pipeline.__init__(
                  self, Type0, {"xy": Type1, "z": Type2}
              )
  
          def transform(self, input_object):
              return {"xy": [], "z": []}
  
      class UnitR(pipeline.Pipeline):
          def __init__(self):
              pipeline.Pipeline.__init__(
                  self, {"xy": Type1, "z": Type2}, Type4
              )
  
          def transform(self, input_object):
              input_dict = input_object
              return [
                  Type4(
                      input_dict["xy"].x,
                      input_dict["xy"].y,
                      input_dict["z"].z,
                  )
              ]
  
      class UnitS(pipeline.Pipeline):
          def __init__(self):
              pipeline.Pipeline.__init__(self, Type0, Type1)
  
          def transform(self, unused_input_dict):
              return []
  
      q, r, s = UnitQ(), UnitR(), UnitS()
      dag = {
          q: dag_pipeline.DagInput(Type0),
          r: q,
          dag_pipeline.DagOutput("output"): r,
      }
      dag_pipe_obj = dag_pipeline.DAGPipeline(dag)
      self.assertEqual(
          dag_pipe_obj.transform(Type0(1, 2, 3)), {"output": []}
      )
  
      dag = {
          q: dag_pipeline.DagInput(Type0),
          s: dag_pipeline.DagInput(Type0),
          r: {"xy": s, "z": q["z"]},
          dag_pipeline.DagOutput("output"): r,
      }
      dag_pipe_obj = dag_pipeline.DAGPipeline(dag)
      self.assertEqual(
          dag_pipe_obj.transform(Type0(1, 2, 3)), {"output": []}
      )
  
      dag = {
          s: dag_pipeline.DagInput(Type0),
          dag_pipeline.DagOutput("output"): s,
      }
      dag_pipe_obj = dag_pipeline.DAGPipeline(dag)
      self.assertEqual(
          dag_pipe_obj.transform(Type0(1, 2, 3)), {"output": []}
      )
  
      dag = {
          q: dag_pipeline.DagInput(Type0),
          dag_pipeline.DagOutput(): q,
      }
      dag_pipe_obj = dag_pipeline.DAGPipeline(dag)
      self.assertEqual(
          dag_pipe_obj.transform(Type0(1, 2, 3)), {"xy": [], "z": []}
      )
  
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 8 for calling the DAGPipelineTest obj's underlying member method code with example usage: obj.testNoOutputs() and returns: dict, list, list