code: def get_config_requirements(config: [str, Path, dict]):
      config = parse_config(config)
  
      requirements = set()
      for req in config.get("metadata", {}).get("requirements", []):
          requirements.add(req)
  
      config_references = [
          expand_path(config_ref)
          for config_ref in get_all_elems_from_json(
              config, "config_path"
          )
      ]
      requirements |= {
          req
          for config in config_references
          for req in get_config_requirements(config)
      }
  
      return requirements
  
file_path: DeepPavlov/deeppavlov/utils/pip_wrapper/pip_wrapper.py
imports: import os
  import re
  import subprocess
  import sys
  from logging import getLogger
  from pathlib import Path
  from deeppavlov.core.commands.utils import expand_path, parse_config
  from deeppavlov.core.data.utils import get_all_elems_from_json
label_desc: Use image node_id 2 for calling a global function with example usage: get_config_requirements(config) and returns: requirements