code: def test_duplicate(self):
      select = Select(options=["first", 1, "dup", "dup"])
      observations = []
  
      def f(change):
          observations.append(change.new)
  
      select.observe(f, "index")
      select.index = 3
      assert select.index == 3
      assert select.value == "dup"
      assert select.label == "dup"
      assert observations == [3]
      select.index = 2
      assert select.index == 2
      assert select.value == "dup"
      assert select.label == "dup"
      assert observations == [3, 2]
      select.index = 0
      assert select.index == 0
      assert select.value == "first"
      assert select.label == "first"
      assert observations == [3, 2, 0]
  
      # picks the first matching value
      select.value = "dup"
      assert select.index == 2
      assert select.value == "dup"
      assert select.label == "dup"
      assert observations == [3, 2, 0, 2]
  
file_path: catboost/contrib/python/ipywidgets/py3/ipywidgets/widgets/tests/test_widget_selection.py
imports: import inspect
  from unittest import TestCase
  from traitlets import TraitError
  from ipywidgets import Dropdown, SelectionSlider, Select
label_desc: Use image node_id 3 for calling the TestSelection obj's underlying member method code with example usage: obj.test_duplicate() without return types