code: def check_output_for_grouping(grouping):
      """
      Check the behavior of a callback that returns the specified grouping
      """
      outputs = make_dependency_grouping(grouping, Output)
      multi = not isinstance(outputs, Output)
      app = dash.Dash()
      mock_fn = mock.Mock()
      mock_fn.return_value = grouping
      if multi:
          callback_id = create_callback_id(
              flatten_grouping(outputs), []
          )
      else:
          callback_id = create_callback_id(outputs, [])
  
      app.callback(
          outputs,
          Input("input-a", "prop"),
      )(mock_fn)
  
      wrapped_fn = app.callback_map[callback_id]["callback"]
  
      expected_outputs = [
          (dep.component_id, dep.component_property, val)
          for dep, val in zip(
              flatten_grouping(outputs), flatten_grouping(grouping)
          )
      ]
  
      outputs_list = [
          {"id": out[0], "property": out[1]} for out in expected_outputs
      ]
      if not multi:
          outputs_list = outputs_list[0]
  
      result = json.loads(
          wrapped_fn("Hello", outputs_list=outputs_list)
      )
  
      response = result["response"]
      for id, prop, val in expected_outputs:
          assert response[id][prop] == val
  
imports: import dash
  from dash._grouping import make_grouping_by_index, grouping_len, flatten_grouping
  from dash._utils import create_callback_id
  from dash.dependencies import Input, State, Output, ClientsideFunction
  import mock
  import json
  import string
  import pytest
  from fixtures import scalar_grouping_size, list_grouping_size, dict_grouping_size, mixed_grouping_size
label_desc: Use image node_id 2 for calling a global function with example usage: check_output_for_grouping(grouping) without return types