def METHOD_NAME(vocab_path):
    """Reads vocab file from disk as .pkl or .json
    Args:
        vocab_path (str): path to vocab file
    Raises:
        ValueError: If wrong extension of the file
    Returns:
        Vocab: Vocab object with sign2id and id2sign dictinaries
    """
    if vocab_path.suffix == '.pkl':
        with open(vocab_path, "rb") as f:
            vocab_dict = pkl.load(f) # nosec - disable B301: pickle load check
    elif vocab_path.suffix == '.json':
        with open(vocab_path, "r", encoding='UTF-8') as f:
            vocab_dict = json.load(f)
            id2sign = {int(k): v for k, v in vocab_dict['id2sign'].items()}
            vocab_dict['id2sign'] = id2sign
    else:
        raise ValueError("Wrong extension of the vocab file")
    return vocab_dict["id2sign"]