code: def _try_load_spacy_model(
      model_name: str, disable: Iterable[str] = ()
  ):
      disable = set(disable)
      try:
          model = spacy.load(model_name, disable=disable)
      except OSError as e:
          try:
              model = __import__(model_name).load(disable=disable)
              if not isinstance(model, spacy.language.Language):
                  raise RuntimeError(
                      f"{model_name} is not a spacy model module"
                  )
          except Exception:
              raise e
      return model
  
file_path: DeepPavlov/deeppavlov/models/tokenizers/spacy_tokenizer.py
imports: from logging import getLogger
  from typing import List, Generator, Any, Optional, Union, Tuple, Iterable
  import spacy
  import spacy.language
  from deeppavlov.core.common.registry import register
  from deeppavlov.core.models.component import Component
  from deeppavlov.models.tokenizers.utils import detokenize, ngramize
label_desc: Use image node_id 1 for calling a global function with example usage: _try_load_spacy_model(model_name, disable) and returns: model