code: def test_build_x_dropdown():
      import dtale.views as views
  
      df = pd.DataFrame(
          dict(
              a=[1, 2, 3],
              b=[4, 5, 6],
              c=[7, 8, 9],
              d=pd.date_range("20200101", "20200103"),
              e=[10, 11, 12],
          )
      )
      with app.test_client() as c:
          df, _ = views.format_data(df)
          build_data_inst({c.port: df})
          fig_data_outputs = "..drilldown-x-dropdown-1.options...drilldown-x-dropdown-1.value.."
          inputs = {
              "id": "input-data",
              "property": "data",
              "value": {
                  "data_id": c.port,
                  "chart_type": "scatter3d",
                  "x": "a",
                  "y": ["b"],
                  "z": "c",
                  "group": None,
                  "agg": None,
                  "window": None,
                  "rolling_comp": None,
                  "animate_by": "date",
              },
          }
          params = build_dash_request(
              fig_data_outputs,
              "chart-1.clickData",
              {
                  "id": "drilldown-modal-1",
                  "property": "is_open",
                  "value": False,
              },
              [
                  inputs,
                  {
                      "id": "chart-input-data",
                      "property": "data",
                      "value": {
                          "cpg": False,
                          "barmode": "group",
                          "barsort": None,
                      },
                  },
                  {"id": "yaxis-data", "property": "data", "value": {}},
                  {
                      "id": "map-input-data",
                      "property": "data",
                      "value": {},
                  },
              ],
          )
          response = c.post(
              "/dtale/charts/_dash-update-component", json=params
          )
          assert response.get_json() is None
          assert response.status_code == 204
          params["inputs"][0]["value"] = True
          response = c.post(
              "/dtale/charts/_dash-update-component", json=params
          )
          response = response.get_json()["response"][
              "drilldown-x-dropdown-1"
          ]
          assert len(response["options"]) == 12
          assert response["options"][0] == {
              "label": "__index__",
              "value": "__index__",
          }
          assert response["options"][-1] == {"label": "e", "value": "e"}
          assert response["value"] == "a"
  
          params["state"][1]["value"]["chart_type"] = "maps"
          params["state"][-1]["value"] = {
              "map_type": "choropleth",
              "loc": "a",
              "map_val": "b",
          }
          response = c.post(
              "/dtale/charts/_dash-update-component", json=params
          )
          assert (
              response.get_json()["response"]["drilldown-x-dropdown-1"][
                  "value"
              ]
              == "a"
          )
  
          params["state"][-1]["value"] = {
              "map_type": "scattergeo",
              "lat": "a",
              "lon": "b",
              "map_val": "c",
          }
          response = c.post(
              "/dtale/charts/_dash-update-component", json=params
          )
          assert (
              response.get_json()["response"]["drilldown-x-dropdown-1"][
                  "value"
              ]
              == "lat_lon"
          )
  
file_path: dtale/tests/dtale/dash/test_drilldown.py
imports: import pandas
  import pytest
  from tests.dtale import build_data_inst
  from tests.dtale.dash.test_dash import build_dash_request, print_traceback, ts_builder
  from tests.dtale.test_views import app
label_desc: Use image node_id 2 for calling a global function with example usage: test_build_x_dropdown() without return types