code: def _add_kwargs(cfg, kwargs):
      """Add keyword arguments to config
  
      Args:
          cfg: (dict) Dictionary of configs from config.yaml
          kwargs: (dict) Dictionary of keyword arguments
  
      Returns:
          Union of cfg and kwargs
  
      """
      for key, item in kwargs.items():
          if isinstance(item, dict):
              if key in cfg:
                  cfg[key] = _add_kwargs(cfg[key], item)
              else:
                  cfg[key] = item
          else:
              cfg[key] = item
      return cfg
  
file_path: lightly/lightly/core.py
imports: import os
  from typing import List, Tuple
  import numpy
  import yaml
  import lightly.cli
  from lightly.cli.embed_cli import _embed_cli
  from lightly.cli.lightly_cli import _lightly_cli
  from lightly.cli.train_cli import _train_cli
label_desc: Use image node_id 3 for calling a global function with example usage: _add_kwargs(cfg, kwargs) and returns: cfg