code: def test_points_selection(self, dynamic=False, show_regions=True):
      points = Points(self.data)
      if dynamic:
          # Convert points to DynamicMap that returns the element
          points = hv.util.Dynamic(points)
  
      lnk_sel = link_selections.instance(
          show_regions=show_regions, unselected_color="#ff0000"
      )
      linked = lnk_sel(points)
      current_obj = linked[()]
  
      # Check initial state of linked dynamic map
      self.assertIsInstance(current_obj, hv.Overlay)
      unselected, selected, region, region2 = current_obj.values()
  
      # Check initial base layer
      self.check_base_points_like(unselected, lnk_sel)
  
      # Check selection layer
      self.check_overlay_points_like(selected, lnk_sel, self.data)
  
      # 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, hv.streams.SelectionXY)
      selectionxy.event(bounds=(0, 1, 5, 5))
      unselected, selected, region, region2 = linked[()].values()
  
      # Check that base layer is unchanged
      self.check_base_points_like(unselected, lnk_sel)
  
      # Check selection layer
      self.check_overlay_points_like(
          selected, lnk_sel, self.data.iloc[1:]
      )
  
      if show_regions:
          self.assertEqual(region, Rectangles([(0, 1, 5, 5)]))
      else:
          self.assertEqual(region, Rectangles([]))
  
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 7 for calling the TestLinkSelections obj's underlying member method code with example usage: obj.test_points_selection(dynamic, show_regions) without return types