docs: OmemoCachedDeviceList mergeCachedDeviceList(OmemoDevice userDevice, BareJid contact, OmemoDeviceListElement list) {
          OmemoCachedDeviceList cached = loadCachedDeviceList(userDevice, contact);
  
          if (cached == null) {
              cached = new OmemoCachedDeviceList();
          }
  
          if (list == null) {
              return cached;
          }
  
          for (int devId : list.getDeviceIds()) {
              if (!cached.contains(devId)) {
                  setDateOfLastDeviceIdPublication(userDevice, new OmemoDevice(contact, devId), new Date());
              }
          }
  
          cached.merge(list.getDeviceIds());
          storeCachedDeviceList(userDevice, contact, cached);
  
          return cached;
      }