code: def test_build_switcher():
      with warnings.catch_warnings(record=True) as l_warns:
          none_switcher = build_switcher()
          npt.assert_equal(none_switcher, None)
          check_for_warnings(l_warns, "No items passed in switcher")
  
      switcher_label, switcher = build_switcher(
          [{"label": "Hello", "value": "hello"}]
      )
      npt.assert_equal(switcher.selected_value[0], 0)
      npt.assert_equal(switcher.selected_value[1], "hello")
      npt.assert_equal(switcher_label.selected_value, "")
  
      switcher_label, switcher = build_switcher(
          [{"label": "Hello", "value": "hello"}], "Greeting", 1
      )
      npt.assert_equal(switcher.selected_value[0], 0)
      npt.assert_equal(switcher.selected_value[1], "hello")
      npt.assert_equal(switcher_label.selected_value, "Greeting")
  
file_path: dipy/dipy/viz/horizon/tab/tests/test_base.py
imports: import pytest
  import warnings
  import numpy.testing
  from dipy.testing import check_for_warnings
  from dipy.utils.optpkg import optional_package
  from dipy.testing.decorators import use_xvfb
  from dipy.viz.horizon.tab.base import build_checkbox, build_label, build_slider, build_switcher
label_desc: Use image node_id 5 for calling a global function with example usage: test_build_switcher() without return types