code: public static SoyMap legacyObjectMapToMap(SoyLegacyObjectMap map) {
      Map<SoyValue, SoyValueProvider> newMap = new HashMap<>();
      for (SoyValue key : map.getItemKeys()) {
        newMap.put(key, map.getItemProvider(key));
      }
      return SoyMapImpl.forProviderMap(newMap);
    }
docs: Converts the parameter to a {@link SoyMap}.