docs: public static <K, V> Map<K, V> take(Map<K, V> self, int num) {
          if (self.isEmpty() || num <= 0) {
              return createSimilarMap(self);
          }
          Map<K, V> ret = createSimilarMap(self);
          for (Map.Entry<K, V> entry : self.entrySet()) {
              K key = entry.getKey();
              V value = entry.getValue();
  
              ret.put(key, value);
              if (--num <= 0) {
                  break;
              }
          }
          return ret;
      }