code: def test_span_group_copy(doc):
      doc.spans["test"] = [doc[0:1], doc[2:4]]
      assert len(doc.spans["test"]) == 2
      doc_copy = doc.copy()
      # check that the spans were indeed copied
      assert len(doc_copy.spans["test"]) == 2
      # add a new span to the original doc
      doc.spans["test"].append(doc[3:4])
      assert len(doc.spans["test"]) == 3
      # check that the copy spans were not modified and this is an isolated doc
      assert len(doc_copy.spans["test"]) == 2
  
imports: import numpy
  import pytest
  from numpy.testing import assert_array_equal
  from thinc.api import get_current_ops
  from spacy.attrs import LENGTH, ORTH
  from spacy.lang.en import English
  from spacy.tokens import Doc, Span, Token
  from spacy.util import filter_spans
  from spacy.vocab import Vocab
  from ..util import add_vecs_to_vocab
  from .test_underscore import clean_underscore
label_desc: Use image node_id 41 for calling a global function with example usage: test_span_group_copy(doc) without return types