code: def test_subject_verb_object_triples(text, svos_exp, lang_en):
      doc = lang_en(text)
      svos = list(extract.subject_verb_object_triples(doc))
      assert all(
          hasattr(svo, attr)
          for svo in svos
          for attr in ["subject", "verb", "object"]
      )
      svos_obs = [
          (
              [tok.text for tok in subject],
              [tok.text for tok in verb],
              [tok.text for tok in object],
          )
          for subject, verb, object in svos
      ]
      assert svos_obs == svos_exp
  
imports: import re
  import pytest
  from textacy import extract
label_desc: Use image node_id 2 for calling a global function with example usage: test_subject_verb_object_triples(text, svos_exp, lang_en) without return types