class_docstr: NER model API
class_docstr_tok: ["NER","model","API"]
docstr: Downloads the pre-trained BIST model if non-existent.
docstr_tok: ["Downloads","the","pre-trained","BIST","model","if","non-existent","."]
code: def _download_pretrained_model(self, prompt=True):
      """Downloads the pre-trained BIST model if non-existent."""
      model_exists = path.isfile(self.pretrained_model)
      model_info_exists = path.isfile(self.pretrained_model_info)
      if not model_exists or not model_info_exists:
          print(
              "The pre-trained models to be downloaded for the NER dataset "
              "are licensed under Apache 2.0. By downloading, you accept the terms "
              "and conditions provided by the license"
          )
          makedirs(self.model_dir, exist_ok=True)
          if prompt is True:
              agreed = NerApi._prompt()
              if agreed is False:
                  sys.exit(0)
          download_unlicensed_file(
              "https://d2zs9tzlek599f.cloudfront.net" "/models/ner/",
              "model_v4.h5",
              self.pretrained_model,
          )
          download_unlicensed_file(
              "https://d2zs9tzlek599f.cloudfront.net" "/models/ner/",
              "model_info_v4.dat",
              self.pretrained_model_info,
          )
          print("Done.")
  
file_path: nlp-architect/nlp_architect/api/ner_api.py
imports: import pickle
  from os import makedirs, path, sys
  import numpy
  from nlp_architect.api.abstract_api import AbstractApi
  from nlp_architect.models.ner_crf import NERCRF
  from nlp_architect import LIBRARY_OUT
  from nlp_architect.utils.generic import pad_sentences
  from nlp_architect.utils.io import download_unlicensed_file
  from nlp_architect.utils.text import SpacyInstance, bio_to_spans
label_desc: Use image node_id 3 for calling the NerApi obj's underlying member method code with example usage: obj._download_pretrained_model(prompt) without return types