code: def process_doc(doc, *semgrex_patterns, enhanced=False):
      """
      Returns the result of processing the given semgrex expression on the stanza doc.
  
      Currently the return is a SemgrexResponse from CoreNLP.proto
      """
      request = build_request(doc, semgrex_patterns, enhanced=enhanced)
  
      return send_semgrex_request(request)
  
file_path: stanza/stanza/server/semgrex.py
imports: import argparse
  import copy
  import stanza
  from stanza.protobuf import SemgrexRequest, SemgrexResponse
  from stanza.server.java_protobuf_requests import send_request, add_token, add_word_to_graph, JavaProtobufContext, convert_networkx_graph
  from stanza.utils.conll import CoNLL
label_desc: Use image node_id 3 for calling a global function with example usage: process_doc(doc) and returns: send_semgrex_request