code: def look_for_class(panel, classname, items=None):
      """
      Descend a panel object and find any instances of the given class
      """
      import panel as pn
  
      if items is None:
          items = []
      if isinstance(panel, pn.layout.ListPanel):
          for p in panel:
              items = look_for_class(p, classname, items)
      elif isinstance(panel, classname):
          items.append(panel)
      return items
  
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 1 for calling a global function with example usage: look_for_class(panel, classname, items) and returns: items