class_docstr: A client to the Stanford CoreNLP server. 
docstr: Set up the default properties for the server.
  
  The properties argument can take on one of 3 value types
  
  1. File path on system or in CLASSPATH (e.g. /path/to/server.props or StanfordCoreNLP-french.properties
  2. Name of a Stanford CoreNLP supported language (e.g. french or fr)
  3. Python dictionary (properties written to tmp file for Java server, erased at end)
  
  In addition, an annotators list and output_format can be specified directly with arguments. These
  will overwrite any settings in the specified properties.
  
  If no properties are specified, the standard Stanford CoreNLP English server will be launched. The outputFormat
  will be set to 'serialized' and use the ProtobufAnnotationSerializer.
docstr_tok: ["Set","up","the","default","properties","for","the","server",".","The","properties","argument","can","take","on","one","of","3","value","types","1",".","File","path","on","system","or","in","CLASSPATH","(","e.g",".","\/path\/to\/server.props","or","StanfordCoreNLP-french.properties","2",".","Name","of","a","Stanford","CoreNLP","supported","language","(","e.g",".","french","or","fr",")","3",".","Python","dictionary","(","properties","written","to","tmp","file","for","Java","server",",","erased","at","end",")","In","addition",",","an","annotators","list","and","output_format","can","be","specified","directly","with","arguments",".","These","will","overwrite","any","settings","in","the","specified","properties",".","If","no","properties","are","specified",",","the","standard","Stanford","CoreNLP","English","server","will","be","launched",".","The","outputFormat","will","be","set","to","'serialized","'","and","use","the","ProtobufAnnotationSerializer","."]
code: def _setup_server_defaults(self):
      """
      Set up the default properties for the server.
  
      The properties argument can take on one of 3 value types
  
      1. File path on system or in CLASSPATH (e.g. /path/to/server.props or StanfordCoreNLP-french.properties
      2. Name of a Stanford CoreNLP supported language (e.g. french or fr)
      3. Python dictionary (properties written to tmp file for Java server, erased at end)
  
      In addition, an annotators list and output_format can be specified directly with arguments. These
      will overwrite any settings in the specified properties.
  
      If no properties are specified, the standard Stanford CoreNLP English server will be launched. The outputFormat
      will be set to 'serialized' and use the ProtobufAnnotationSerializer.
      """
  
      # ensure properties is str or dict
      if self.properties is None or (
          not isinstance(self.properties, str)
          and not isinstance(self.properties, dict)
      ):
          if self.properties is not None:
              logger.warning(
                  "properties passed invalid value (not a str or dict), setting properties = {}"
              )
          self.properties = {}
      # check if properties is a string, pass on to server which can handle
      if isinstance(self.properties, str):
          # try to translate to Stanford CoreNLP language name, or assume properties is a path
          if is_corenlp_lang(self.properties):
              if self.properties.lower() in LANGUAGE_SHORTHANDS_TO_FULL:
                  self.properties = LANGUAGE_SHORTHANDS_TO_FULL[
                      self.properties
                  ]
              logger.info(
                  f"Using CoreNLP default properties for: {self.properties}.  Make sure to have "
                  f"{self.properties} models jar (available for download here: "
                  f"https://stanfordnlp.github.io/CoreNLP/) in CLASSPATH"
              )
          else:
              if not os.path.isfile(self.properties):
                  logger.warning(
                      f"{self.properties} does not correspond to a file path. Make sure this file is in "
                      f"your CLASSPATH."
                  )
          self.server_props_path = self.properties
      elif isinstance(self.properties, dict):
          # make a copy
          server_start_properties = dict(self.properties)
          if self.annotators is not None:
              server_start_properties["annotators"] = self.annotators
          if self.output_format is not None and isinstance(
              self.output_format, str
          ):
              server_start_properties[
                  "outputFormat"
              ] = self.output_format
          # write desired server start properties to tmp file
          # set up to erase on exit
          tmp_path = write_corenlp_props(server_start_properties)
          logger.info(f"Writing properties to tmp file: {tmp_path}")
          atexit.register(clean_props_file, tmp_path)
          self.server_props_path = tmp_path
  
imports: import atexit
  import contextlib
  import enum
  import io
  import os
  import re
  import requests
  import logging
  import json
  import shlex
  import socket
  import subprocess
  import time
  import sys
  import uuid
  from datetime import datetime
  from pathlib import Path
  from urllib.parse import urlparse
  from stanza.protobuf import Document, parseFromDelimitedString, writeToDelimitedString, to_text
label_desc: Use image node_id 3 for calling the CoreNLPClient obj's underlying member method code with example usage: obj._setup_server_defaults() without return types