code: def _spacy_pos_to_ptb(pos, text):
      """
      Converts a Spacy part-of-speech tag to a Penn Treebank part-of-speech tag.
  
      Args:
          pos (str): Spacy POS tag (`tok.tag_`).
          text (str): The token text.
  
      Returns:
          ptb_tag (str): Standard PTB POS tag.
      """
      validate((pos, str, 0, 30), (text, str, 0, 1000))
      ptb_tag = pos
      if text in ["...", "—"]:
          ptb_tag = ":"
      elif text == "*":
          ptb_tag = "SYM"
      elif pos == "AFX":
          ptb_tag = "JJ"
      elif pos == "ADD":
          ptb_tag = "NN"
      elif text != pos and text in [
          ",",
          ".",
          ":",
          "``",
          "-RRB-",
          "-LRB-",
      ]:
          ptb_tag = text
      elif pos in ["NFP", "HYPH", "XX"]:
          ptb_tag = "SYM"
      return ptb_tag
  
imports: import json
  from nlp_architect.utils.io import validate
label_desc: Use image node_id 4 for calling a global function with example usage: _spacy_pos_to_ptb(pos, text) and returns: ptb_tag