docs: private static <K, V> Set<K> synchronizedCopyKeys(Map<K, V> map) {
  
          if (map == null) {
              return new HashSet<K>();
          }
          synchronized (map) {
              return new HashSet<K>(map.keySet());
          }
      }