def METHOD_NAME(self,
                              model,
                              model_revision=None,
                              third_party=None):
    """ Get local model directory or download model if necessary.
    Args:
        model (str): model id or path to local model directory.
        model_revision  (str, optional): model version number.
        third_party (str, optional): in which third party library
            this function is called.
    """
    if os.path.exists(model):
        model_cache_dir = model if os.path.isdir(
            model) else os.path.dirname(model)
        check_local_model_is_latest(
            model_cache_dir,
            user_agent={
                Invoke.KEY: Invoke.LOCAL_TRAINER,
                ThirdParty.KEY: third_party
            })
    else:
        model_cache_dir = snapshot_download(
            model,
            revision=model_revision,
            user_agent={
                Invoke.KEY: Invoke.TRAINER,
                ThirdParty.KEY: third_party
            })
    return model_cache_dir