code: def test_cbmo003_multi_all(dash_duo):
      app = dash.Dash(__name__)
  
      app.layout = html.Div(
          children=[
              html.Button("items", id="items"),
              html.Button("values", id="values"),
              html.Div(id="content1"),
              html.Hr(),
              html.Div(id="content2"),
              html.Hr(),
              html.Div("Output init", id="output"),
          ]
      )
  
      @app.callback(
          [
              Output("content1", "children"),
              Output("content2", "children"),
          ],
          [Input("items", "n_clicks")],
      )
      def content(n1):
          c1 = [
              html.Div(id={"i": i}) for i in range(((n1 or 0) + 2) % 4)
          ]
          c2 = [html.Div(id={"j": j}) for j in range((n1 or 0) % 3)]
          return c1, c2
  
      @app.callback(
          [
              Output({"i": ALL}, "children"),
              Output({"j": ALL}, "children"),
          ],
          [Input("values", "n_clicks")],
      )
      def content_inner(n2):
          # this variant does NOT get called with empty ALL
          # the second callback handles outputting 0 in that case.
          # if it were to be called throw an error so we'll see it in get_logs
          n1i = len(dash.callback_context.outputs_list[0])
          n1j = len(dash.callback_context.outputs_list[1])
          if not n1i + n1j:
              raise ValueError("should not be called with no outputs!")
          return [n2 or 0] * n1i, [(n2 or 0) + 2] * n1j
  
      @app.callback(
          Output("output", "children"),
          [
              Input({"i": ALL}, "children"),
              Input({"j": ALL}, "children"),
          ],
      )
      def out2(ci, cj):
          return sum(ci) + sum(cj)
  
      dash_duo.start_server(app)
  
      dash_duo.wait_for_text_to_equal("#content1", "0\n0")
      dash_duo.wait_for_text_to_equal("#content2", "")
      dash_duo.wait_for_text_to_equal("#output", "0")
  
      actions = [
          ["#values", "1\n1", "", "2"],
          ["#items", "1\n1\n1", "3", "6"],
          ["#values", "2\n2\n2", "4", "10"],
          ["#items", "", "4\n4", "8"],
          ["#values", "", "5\n5", "10"],
          ["#items", "3", "", "3"],
          ["#values", "4", "", "4"],
          ["#items", "4\n4", "6", "14"],
          ["#values", "5\n5", "7", "17"],
          ["#items", "5\n5\n5", "7\n7", "29"],
          ["#values", "6\n6\n6", "8\n8", "34"],
          # all empty! we'll see an error logged if the callback was fired
          ["#items", "", "", "0"],
          ["#values", "", "", "0"],
          ["#items", "7", "9", "16"],
      ]
      for selector, content1, content2, output in actions:
          dash_duo.find_element(selector).click()
          dash_duo.wait_for_text_to_equal("#content1", content1)
          dash_duo.wait_for_text_to_equal("#content2", content2)
          dash_duo.wait_for_text_to_equal("#output", output)
  
      assert not dash_duo.get_logs()
  
file_path: dash/tests/integration/callbacks/test_missing_outputs.py
imports: import pytest
  from multiprocessing import Lock, Value
  import dash
  from dash import Dash, Input, Output, ALL, MATCH, html, dcc
  from dash.testing.wait import until
label_desc: Use image node_id 3 for calling a global function with example usage: test_cbmo003_multi_all(dash_duo) and returns: c1,  c2, unknown,  unknown, unknown