code: def pytest_collection_modifyitems(config, items):
      removed = []
      kept = []
      for item in items:
          marker = item.get_closest_marker("uncollect_if")
          if marker:
              func = marker.kwargs["func"]
              if func(**item.callspec.params):
                  removed.append(item)
                  continue
          kept.append(item)
      if removed:
          config.hook.pytest_deselected(items=removed)
          items[:] = kept
  
label_desc: Use image node_id 2 for calling a global function with example usage: pytest_collection_modifyitems(config, items) without return types