code: def test_underscore_raises_for_dup(obj):
      obj.set_extension("test", default=None)
      with pytest.raises(ValueError):
          obj.set_extension("test", default=None)
  
file_path: spacy/spacy/tests/doc/test_underscore.py
imports: import pytest
  from mock import Mock
  from spacy.tokens import Doc, Span, Token
  from spacy.tokens.underscore import Underscore
label_desc: Use image node_id 8 for calling a global function with example usage: test_underscore_raises_for_dup(obj) without return types