code: def test_semgrex(self, corenlp_client):
      pattern = "{word:wrote} >nsubj {}=subject >obj {}=object"
      matches = corenlp_client.semgrex(TEXT, pattern, to_words=True)
      assert matches == [
          {
              "text": "wrote",
              "begin": 1,
              "end": 2,
              "$subject": {"text": "Chris", "begin": 0, "end": 1},
              "$object": {"text": "sentence", "begin": 4, "end": 5},
              "sentence": 0,
          }
      ]
  
imports: from http.server import BaseHTTPRequestHandler, HTTPServer
  import multiprocessing
  import pytest
  import requests
  import stanza.server
  import stanza.server.client
  import shlex
  import subprocess
  import time
  from stanza.models.constituency import tree_reader
  from stanza.tests import *
label_desc: Use image node_id 8 for calling the TestCoreNLPClient obj's underlying member method code with example usage: obj.test_semgrex(corenlp_client) without return types