code: def test_casting_widgets_to_different_classes(self):
      import panel as pn
  
      pane = self.flowers.hvplot.scatter(
          groupby="species",
          legend="top_right",
          widgets={"species": pn.widgets.DiscreteSlider},
      )
  
      assert len(look_for_class(pane, pn.widgets.DiscreteSlider)) == 1
  
file_path: hvplot/hvplot/tests/testpanel.py
imports: from unittest import TestCase, SkipTest
  from hvplot.util import process_xarray
label_desc: Use image node_id 3 for calling the TestPanelObjects obj's underlying member method code with example usage: obj.test_casting_widgets_to_different_classes() without return types