code: def check_dir():
      if not os.path.exists(local_models_path):
          try:
              os.makedirs(local_models_path)
          except OSError as e:
              if e.errno != errno.EEXIST:
                  raise
  
file_path: nlp-architect/tests/test_spacy_np_annotator.py
imports: import errno
  import os
  from os import path
  import pytest
  from nlp_architect.pipelines.spacy_np_annotator import NPAnnotator, get_noun_phrases, SpacyNPAnnotator
  from nlp_architect.utils.io import download_unlicensed_file
  from nlp_architect.utils.text import SpacyInstance, try_to_load_spacy
label_desc: Use image node_id 1 for calling a global function with example usage: check_dir() without return types