code: def pytest_collection_modifyitems(config, items):
      skipped, selected = [], []
      markers = [
          m for m in optional_markers if config.getoption(f"--{m}")
      ]
      empty = not markers
      for item in items:
          if empty and any(
              m in item.keywords for m in optional_markers
          ):
              skipped.append(item)
          elif empty:
              selected.append(item)
          elif not empty and any(m in item.keywords for m in markers):
              selected.append(item)
          else:
              skipped.append(item)
  
      config.hook.pytest_deselected(items=skipped)
      items[:] = selected
  
file_path: holoviews/holoviews/tests/conftest.py
imports: import contextlib
  import pytest
  from panel.tests.conftest import optional_markers, port, pytest_addoption, pytest_configure, server_cleanup
label_desc: Use image node_id 1 for calling a global function with example usage: pytest_collection_modifyitems(config, items) without return types