code: def parse_value_with_config(
      value: Union[str, Path], config: Union[str, Path, dict]
  ) -> Path:
      """Fill the variables in `value` with variables values from `config`.
      `value` should be a string. If `value` is a string of only variable, `value` will be replaced with
      variable's value from config (the variable's value could be anything then).
      """
      variables, variables_exact = _get_variables_from_config(config)
  
      return _parse_config_property(
          str(value), variables, variables_exact
      )
  
file_path: DeepPavlov/deeppavlov/core/commands/utils.py
imports: import os
  from copy import deepcopy
  from pathlib import Path
  from typing import Any, Union, Dict, TypeVar, Optional
  from deeppavlov.core.common.file import read_json, find_config
  from deeppavlov.core.common.registry import inverted_registry
  from deeppavlov.core.data.utils import get_all_elems_from_json
label_desc: Use image node_id 8 for calling a global function with example usage: parse_value_with_config(value, config) and returns: _parse_config_property