code: def resolve(val):
      if isinstance(val, str) and val.startswith("#"):
          component_id, *attributes = val[1:].split(".")
          try:
              val = _refs[component_id]
          except KeyError:
              e = ConfigError(
                  'Component with id "{id}" was referenced but not initialized'.format(
                      id=component_id
                  )
              )
              log.exception(e)
              raise e
          attributes = ["val"] + attributes
          val = eval(".".join(attributes))
      return val
  
file_path: DeepPavlov/deeppavlov/core/common/params.py
imports: import inspect
  from logging import getLogger
  from types import FunctionType
  from typing import Any, Dict, Union
  from deeppavlov.core.commands.utils import expand_path, parse_config
  from deeppavlov.core.common.errors import ConfigError
  from deeppavlov.core.common.registry import get_model
  from deeppavlov.core.models.component import Component
label_desc: Use image node_id 1 for calling a global function with example usage: resolve(val) and returns: val