docs: public static SoyMap asSoyMap(SoyValue map) {
      Preconditions.checkArgument(isMapOrLegacyObjectMap(map));
      if (map instanceof SoyMapImpl
          || (map instanceof DictImpl
              && ((DictImpl) map).getMapType() == RuntimeMapTypeTracker.Type.MAP)) {
        // These types can already be accessed as a SoyMap, so just return the map directly.
        return (SoyMap) map;
      } else {
        // For other implementations of SoyLegacyObjectMap, convert to a SoyMap. For DictImpl with a
        // runtime type of LEGACY_OBJECT_MAP_OR_RECORD, we must convert the map to a SoyMap so
        // DictImpl doesn't throw an exception when using SoyMap methods on a map marked with the
        // runtime type of LEGACY_OBJECT_MAP_OR_RECORD. Similarly, for DictImpl with a runtime type of
        // UNKNOWN, we also treat this as a SoyLegacyObjectMap to retain the existing behavior in
        // plugins (which check for "instanceof SoyLegacyObjectMap" then use SoyLegacyObjectMap's
        // methods).
        return legacyObjectMapToMap((SoyLegacyObjectMap) map);
      }
    }