code: def test_stda001_data_types(dash_dcc):
      app = Dash(__name__)
  
      types = [
          ("str", "hello"),
          ("number", 1),
          ("dict", {"data": [2, 3, None]}),
          ("list", [5, -6, 700000, 1e-12]),
          ("null", None),
          ("bool", True),
          ("bool", False),
          ("empty-dict", {}),
      ]
      data_types = list(
          itertools.chain(*itertools.combinations(types, 2))
      ) + [  # No combinations as it add much test time.
          (
              "list-dict-1",
              [1, 2, {"data": [55, 66, 77], "dummy": "dum"}],
          ),
          ("list-dict-2", [1, 2, {"data": [111, 99, 88]}]),
          ("dict-3", {"a": 1, "c": 1}),
          ("dict-2", {"a": 1, "b": None}),
      ]
  
      app.layout = html.Div(
          [
              html.Div(id="output"),
              html.Button("click", id="click"),
              dcc.Store(id="store"),
          ]
      )
  
      @app.callback(
          Output("output", "children"),
          [Input("store", "modified_timestamp")],
          [State("store", "data")],
      )
      def on_data(ts, data):
          if ts is None:
              raise PreventUpdate
          return json.dumps(data)
  
      @app.callback(
          Output("store", "data"), [Input("click", "n_clicks")]
      )
      def on_click(n_clicks):
          if n_clicks is None:
              raise PreventUpdate
          return data_types[n_clicks - 1][1]
  
      dash_dcc.start_server(app)
  
      button = dash_dcc.wait_for_element("#click")
      for data_type in data_types:
          button.click()
          dash_dcc.wait_for_text_to_equal(
              "#output", json.dumps(data_type[1])
          )
  
      assert dash_dcc.get_logs() == []
  
file_path: dash/components/dash-core-components/tests/integration/store/test_store_data.py
imports: import sys
  import json
  import hashlib
  import itertools
  import pytest
  from dash import Dash, Input, Output, State, dcc, html
  from dash.exceptions import PreventUpdate
label_desc: Use image node_id 1 for calling a global function with example usage: test_stda001_data_types(dash_dcc) and returns: json, data_types