def METHOD_NAME(config: Union[str, Path, dict]):
    """Read config's variables"""
    if isinstance(config, (str, Path)):
        config = read_json(find_config(config))
    variables = {
        'DEEPPAVLOV_PATH': os.getenv(f'DP_DEEPPAVLOV_PATH', Path(__file__).parent.parent.parent)
    }
    variables_exact = {f'{{{k}}}': v for k, v in variables.items()}
    for name, value in config.get('metadata', {}).get('variables', {}).items():
        env_name = f'DP_{name}'
        if env_name in os.environ:
            value = os.getenv(env_name)
        if value in variables_exact:
            value = variables_exact[value]
        elif isinstance(value, str):
            value = value.format(**variables)
        variables[name] = value
        variables_exact[f'{{{name}}}'] = value
    return variables, variables_exact