code: def get_spacy_model(spacy_model_name, pos_tags, parse, ner):
      """
      In order to avoid loading spacy models a whole bunch of times, we'll save references to them,
      keyed by the options we used to create the spacy model, so any particular configuration only
      gets loaded once.
      """
  
      options = (spacy_model_name, pos_tags, parse, ner)
      if options not in LOADED_SPACY_MODELS:
          disable = ["vectors", "textcat"]
          if not pos_tags:
              disable.append("tagger")
          if not parse:
              disable.append("parser")
          if not ner:
              disable.append("ner")
          try:
              spacy_model = spacy.load(
                  spacy_model_name, disable=disable
              )
          except OSError:
              logger.warning(
                  "Spacy models '{spacy_model_name}' not found.  Downloading and installing."
              )
              spacy_download(spacy_model_name)
              spacy_model = spacy.load(
                  spacy_model_name, disable=disable
              )
  
          LOADED_SPACY_MODELS[options] = spacy_model
      return LOADED_SPACY_MODELS[options]
  
imports: from __future__ import division
  from __future__ import absolute_import
  import importlib
  import logging
  import pkgutil
  import random
  import subprocess
  import sys
  import os
  import torch
  import numpy
  import spacy
  from spacy.cli.download import download
  from spacy.language import Language
  import allennlp
  from allennlp.common.checks import log_pytorch_version_info
  from allennlp.common.params import Params
  from allennlp.common.tqdm import Tqdm
  from allennlp.common.tee_logger import TeeLogger
label_desc: Use image node_id 9 for calling a global function with example usage: get_spacy_model(spacy_model_name, pos_tags, parse, ner) and returns: LOADED_SPACY_MODELS