code: def _check_and_get_path(pretrained_name_or_dir):
      if os.path.exists(pretrained_name_or_dir):
          return pretrained_name_or_dir
      for cls_name, embedding_cls in text_embedding_reg.items():
          if pretrained_name_or_dir in embedding_cls:
              source = pretrained_name_or_dir
              file_name, file_hash = embedding_cls[source]
              return _get_file_path(cls_name, file_name, file_hash)
  
      return None
  
file_path: gluon-nlp/src/gluonnlp/embedding/embed_loader.py
imports: import io
  import logging
  import os
  import warnings
  import fasttext
  import numpy
  from mxnet.gluon.utils import download, check_sha1, _get_repo_file_url
  from .None import _constants
  from ..base import get_home_dir
  from ..data import Vocab
label_desc: Use image node_id 7 for calling a global function with example usage: _check_and_get_path(pretrained_name_or_dir) and returns: None, pretrained_name_or_dir, _get_file_path