code: def add_dicts_by_key(in_dict1, in_dict2):
      """
      Combines two dictionaries and adds the values for those keys that are shared
      """
      both = {}
      for key1 in in_dict1:
          for key2 in in_dict2:
              if key1 == key2:
                  both[key1] = in_dict1[key1] + in_dict2[key2]
      return both
  
imports: import os.path
  import pickle
  import numpy
  import networkx
  from ...None import logging
  from ...utils.filemanip import split_filename
  from ..base import BaseInterface, BaseInterfaceInputSpec, traits, File, TraitedSpec, InputMultiPath, OutputMultiPath, isdefined
  from .base import have_cmp
label_desc: Use image node_id 5 for calling a global function with example usage: add_dicts_by_key(in_dict1, in_dict2) and returns: both