def _parse_config_property(item: _T, variables: Dict[str, Union[str, Path, float, bool, int, None]],
                           variables_exact: Dict[str, Union[str, Path, float, bool, int, None]]) -> _T:
    """Recursively apply config's variables values to its property"""
    if isinstance(item, str):
        if item in variables_exact:
            return variables_exact[item]
        return item.format(**variables)
    elif isinstance(item, list):
        return [_parse_config_property(item, variables, variables_exact) for item in item]
    elif isinstance(item, dict):
        return {k: _parse_config_property(v, variables, variables_exact) for k, v in item.items()}
    else:
        return item
Recursively apply config's variables values to its property
deeppavlov/core/commands/utils.py