code: def test_warn():
      with pytest.warns(UserWarning, match="test"):
          warn("test")
  
imports: import warnings
  from unittest.mock import patch
  import pytest
  from torch_geometric.warnings import warn
label_desc: Use image node_id 1 for calling a global function with example usage: test_warn() without return types