code: def load_parser(chunker):
      # load spacy parser
      logger.info("loading spacy. chunker=%s", chunker)
      if "nlp_arch" in chunker:
          parser = SpacyInstance(
              model="en_core_web_sm",
              disable=["textcat", "ner", "parser"],
          ).parser
          parser.add_pipe(parser.create_pipe("sentencizer"), first=True)
          _path_to_model = path.join(chunker_path, chunker_model_file)
          _path_to_params = path.join(
              chunker_path, chunker_model_dat_file
          )
          if not path.exists(chunker_path):
              makedirs(chunker_path)
          if not path.exists(_path_to_model):
              logger.info(
                  "The pre-trained model to be downloaded for NLP Architect"
                  " word chunker model is licensed under Apache 2.0"
              )
              download_unlicensed_file(
                  nlp_chunker_url, chunker_model_file, _path_to_model
              )
          if not path.exists(_path_to_params):
              download_unlicensed_file(
                  nlp_chunker_url,
                  chunker_model_dat_file,
                  _path_to_params,
              )
          parser.add_pipe(
              NPAnnotator.load(_path_to_model, _path_to_params),
              last=True,
          )
      else:
          parser = SpacyInstance(
              model="en_core_web_sm", disable=["textcat", "ner"]
          ).parser
      logger.info("spacy loaded")
      return parser
  
file_path: nlp-architect/solutions/set_expansion/prepare_data.py
imports: import gzip
  import json
  import logging
  from argparse import ArgumentParser
  from os import path, makedirs
  from tqdm import tqdm
  from nlp_architect import LIBRARY_OUT
  from nlp_architect.pipelines.spacy_np_annotator import NPAnnotator, get_noun_phrases
  from nlp_architect.utils.io import check_size, download_unlicensed_file, validate_parent_exists
  from nlp_architect.utils.text import spacy_normalizer, SpacyInstance
label_desc: Use image node_id 2 for calling a global function with example usage: load_parser(chunker) and returns: parser