def _restrict_dicts(self, keys, dict1, dict2=None):
    ret1 = {}
    ret2 = None if dict2 is None else {}
    for k in keys:
      if k in dict1:
        ret1[k] = dict1[k]
      if dict2 is not None and k in dict2:
        ret2[k] = dict2[k]
    return ret1, ret2
Allows for the update of network links.
dataset/ETHPy150Open pantsbuild/pants/src/python/pants/backend/jvm/zinc/zinc_analysis.py/ZincAnalysis._restrict_dicts--crossover with--dataset/ETHPy150Open tmetsch/occi-os/occi_os_api/backends/network.py/NetworkInterfaceBackend.update