      {'getter': True}])
  def test_underscore_raises_for_invalid(invalid_kwargs):
      doc = Doc(Vocab(), words=['hello', 'world'])
      with pytest.raises(ValueError):
          doc.set_extension('test', **invalid_kwargs, force=True)
  
  
  @pytest.mark.parametrize('valid_kwargs', [
      {'getter': lambda: None},
      {'getter': lambda: None, 'setter': lambda: None},
 
</s> remove     doc.set_extension('test', **valid_kwargs, force=True)
 </s> add     doc.set_extension('test', **valid_kwargs)
        doc.set_extension('test', **invalid_kwargs)
      {'getter': True}])
  def test_underscore_raises_for_invalid(invalid_kwargs):
      doc = Doc(Vocab(), words=['hello', 'world'])
      with pytest.raises(ValueError):
        doc.set_extension('test', **invalid_kwargs)
  
  
  @pytest.mark.parametrize('valid_kwargs', [
      {'getter': lambda: None},
      {'getter': lambda: None, 'setter': lambda: None},
keep keep keep keep replace keep keep keep keep keep
 Fix tests for Python 2 
spacy/tests/test_underscore.py