def get_vocabulary_info(feature_info, file_io):
    """
    Extract the vocabulary (encoding and values) from the stated vocabulary_file inside feature_info.

    Parameters
    ----------
    feature_info : dict
        Dictionary representing the configuration parameters for the specific feature from the FeatureConfig
    file_io : FileIO object
        FileIO handler object for reading and writing files

    Returns
    -------
    vocabulary_keys : list
        values of the vocabulary stated in the vocabulary_file.
    vocabulary_ids : list
        corresponding encoding ids (values of the vocabulary_keys).

    Notes
    -----
    Args under `feature_layer_info`
        vocabulary_file : str
            path to vocabulary CSV file for the input tensor containing the vocabulary to look-up.
            uses the "key" named column as vocabulary of the 1st column if no "key" column present.
        max_length : int
            max number of rows to consider from the vocabulary file.
            if null, considers the entire file vocabulary.
        default_value : int
            default stated value in the configure used to replace missing data points.
    """
    args = feature_info.get("feature_layer_info")["args"]
    vocabulary_df = file_io.read_df(args["vocabulary_file"])
    if "key" in vocabulary_df.columns:
        vocabulary_keys = vocabulary_df["key"]
    else:
        vocabulary_keys = vocabulary_df.iloc[:, 0]
    if "max_length" in args:
        vocabulary_keys = vocabulary_keys[: args["max_length"]]
    if "default_value" in feature_info:
        vocabulary_keys = vocabulary_keys.fillna(feature_info["default_value"])
    vocabulary_keys = vocabulary_keys.values
    if "dropout_rate" in args:
        # NOTE: If a dropout_rate is specified, then reserve 0 as the OOV index
        vocabulary_ids = (
            vocabulary_df["id"].values
            if "id" in vocabulary_df
            else list(range(1, len(vocabulary_keys) + 1))
        )
        if 0 in vocabulary_ids:
            raise ValueError(
                "Can not use ID 0 with dropout. Use categorical_embedding_with_vocabulary_file instead."
            )
    else:
        vocabulary_ids = (
            vocabulary_df["id"].values
            if "id" in vocabulary_df
            else list(range(len(vocabulary_keys)))
        )
    return vocabulary_keys, vocabulary_ids