          retokenizer.merge(doc[0:2], attrs={"_": {"a": True, "b": "1"}})
          retokenizer.merge(doc[2:4], attrs={"_": {"a": None, "b": "2"}})
      assert doc[0]._.a == True
      assert doc[0]._.b == "1"
      assert doc[1]._.a == None
      assert doc[1]._.b == "2"
  
  
  @pytest.mark.parametrize("underscore_attrs", [{"a": "x"}, {"b": "x"}, {"c": "x"}, [1]])
  def test_doc_retokenize_merge_extension_attrs_invalid(en_vocab, underscore_attrs):
 
</s> remove     assert doc[0]._.a == True
 </s> add     assert doc[0]._.a is True </s> remove     assert doc[0]._.a == True
 </s> add     assert doc[0]._.a is True
    assert doc[1]._.a is None
          retokenizer.merge(doc[0:2], attrs={"_": {"a": True, "b": "1"}})
          retokenizer.merge(doc[2:4], attrs={"_": {"a": None, "b": "2"}})
      assert doc[0]._.a == True
      assert doc[0]._.b == "1"
    assert doc[1]._.a is None
      assert doc[1]._.b == "2"
  
  
  @pytest.mark.parametrize("underscore_attrs", [{"a": "x"}, {"b": "x"}, {"c": "x"}, [1]])
  def test_doc_retokenize_merge_extension_attrs_invalid(en_vocab, underscore_attrs):
keep keep keep keep replace keep keep keep keep keep
 Tidy up tests [ci skip] 
spacy/tests/doc/test_retokenize_merge.py