code: def test_selection_deprecation():
      # We use the `warnings.catch_warnings` context so pytest will also report deprecation warnings
      with warnings.catch_warnings():
          warnings.simplefilter("error")
  
          # new syntax
          alt.selection_point()
          alt.selection_interval()
  
          # this v4 syntax is deprecated
          with pytest.warns(
              alt.utils.deprecation.AltairDeprecationWarning
          ):
              alt.selection_single()
          with pytest.warns(
              alt.utils.deprecation.AltairDeprecationWarning
          ):
              alt.selection_multi()
  
          # new syntax
          brush = alt.selection_interval()
          c = alt.Chart().mark_point()
          c.add_params(brush)
  
          # this v4 syntax is deprecated
          brush = alt.selection_interval()
          c = alt.Chart().mark_point()
          with pytest.warns(
              alt.utils.deprecation.AltairDeprecationWarning
          ):
              c.add_selection(brush)
  
file_path: altair/tests/vegalite/v5/test_params.py
imports: import pandas
  import warnings
  import pytest
  import re
  import altair.vegalite.v5
label_desc: Use image node_id 3 for calling a global function with example usage: test_selection_deprecation() without return types