code: def test_datashade_selection(self):
      points = Points(self.data)
      layout = points + dynspread(datashade(points))
  
      lnk_sel = link_selections.instance(unselected_color="#ff0000")
      linked = lnk_sel(layout)
      current_obj = linked[()]
  
      # Check base points layer
      self.check_base_points_like(current_obj[0][()].Points.I, lnk_sel)
  
      # Check selection layer
      self.check_overlay_points_like(
          current_obj[0][()].Points.II, lnk_sel, self.data
      )
  
      # Check RGB base layer
      self.assertEqual(
          current_obj[1][()].RGB.I,
          dynspread(
              datashade(points, cmap=lnk_sel.unselected_cmap, alpha=255)
          )[()],
      )
  
      # Check RGB selection layer
      self.assertEqual(
          current_obj[1][()].RGB.II,
          dynspread(
              datashade(points, cmap=lnk_sel.selected_cmap, alpha=255)
          )[()],
      )
  
      # Perform selection of second and third point
      selectionxy = (
          TestLinkSelections.get_value_with_key_type(
              lnk_sel._selection_expr_streams, hv.Points
          )
          .input_streams[0]
          .input_stream.input_streams[0]
      )
  
      self.assertIsInstance(selectionxy, SelectionXY)
      selectionxy.event(bounds=(0, 1, 5, 5))
      current_obj = linked[()]
  
      # Check that base points layer is unchanged
      self.check_base_points_like(current_obj[0][()].Points.I, lnk_sel)
  
      # Check points selection layer
      self.check_overlay_points_like(
          current_obj[0][()].Points.II, lnk_sel, self.data.iloc[1:]
      )
  
      # Check that base RGB layer is unchanged
      self.assertEqual(
          current_obj[1][()].RGB.I,
          dynspread(
              datashade(points, cmap=lnk_sel.unselected_cmap, alpha=255)
          )[()],
      )
  
      # Check selection RGB layer
      self.assertEqual(
          current_obj[1][()].RGB.II,
          dynspread(
              datashade(
                  points.iloc[1:], cmap=lnk_sel.selected_cmap, alpha=255
              )
          )[()],
      )
  
imports: from unittest import skip, skipIf
  import pandas
  import holoviews
  from holoviews.core.options import Cycle, Store
  from holoviews.element import ErrorBars, Points, Rectangles, Table, VSpan
  from holoviews.element.comparison import ComparisonTestCase
  from holoviews.plotting.util import linear_gradient
  from holoviews.selection import link_selections
  from holoviews.streams import SelectionXY
label_desc: Use image node_id 12 for calling the TestLinkSelections obj's underlying member method code with example usage: obj.test_datashade_selection() without return types