code: def test_build_saved_header(unittest):
      from dtale.dash_application.saved_charts import build_saved_header
  
      config = {
          "data_id": "1",
          "chart_type": "heatmap",
          "query": "test_query",
          "agg": "sum",
          "group": ["group"],
          "x": "x",
          "y": ["y1", "y2"],
          "z": "z",
          "group_type": "raw",
          "groups": ["group1", "group2"],
          "cpg": True,
          "cpy": True,
          "animate_by": "animate_by",
      }
      header = build_saved_header(config)
      assert len(header.children[1].children[1]) == 65
  
      config["chart_type"] = "scatter"
      config["trendline"] = True
      config["group_type"] = "bins"
      config["bin_type"] = "width"
      config["bin_val"] = 5
      header = build_saved_header(config)
      assert len(header.children[1].children[1]) == 65
  
      config["chart_type"] = "maps"
      config["map_group"] = "group"
      config["map_type"] = "scattergeo"
      header = build_saved_header(config)
      assert len(header.children[1].children[1]) == 60
  
      config["map_type"] = "mapbox"
      header = build_saved_header(config)
      assert len(header.children[1].children[1]) == 60
  
      config["map_type"] = "choropleth"
      header = build_saved_header(config)
      assert len(header.children[1].children[1]) == 60
  
      config["chart_type"] = "candlestick"
      config["cs_group"] = "group"
      header = build_saved_header(config)
      assert len(header.children[1].children[1]) == 50
  
      config["chart_type"] = "treemap"
      config["treemap_group"] = "group"
      header = build_saved_header(config)
      assert len(header.children[1].children[1]) == 50
  
file_path: dtale/tests/dtale/dash/test_saved_charts.py
imports: import pandas
  import pytest
  from tests import ExitStack
  from tests.dtale import build_data_inst
  from tests.dtale.test_views import app
  from tests.dtale.dash.test_dash import ts_builder
label_desc: Use image node_id 1 for calling a global function with example usage: test_build_saved_header(unittest) without return types