code: def test_analysis_validate_attrs_valid():
      attrs = [
          "doc.sents",
          "doc.ents",
          "token.tag",
          "token._.xyz",
          "span._.xyz",
      ]
      assert validate_attrs(attrs)
      for attr in attrs:
          assert validate_attrs([attr])
      with pytest.raises(ValueError):
          validate_attrs(["doc.sents", "doc.xyz"])
  
file_path: spacy/spacy/tests/pipeline/test_analysis.py
imports: import pytest
  from mock import Mock
  from spacy.language import Language
  from spacy.pipe_analysis import get_attr_info, validate_attrs
label_desc: Use image node_id 3 for calling a global function with example usage: test_analysis_validate_attrs_valid() without return types