private void addSerdes(KV<Serde, Serde> serdes, String streamId, Map<String, Serde> keySerdeMap,
      Map<String, Serde> msgSerdeMap) {
    if (serdes != null) {
      if (serdes.getKey() != null && !(serdes.getKey() instanceof NoOpSerde)) {
        keySerdeMap.put(streamId, serdes.getKey());
      }
      if (serdes.getValue() != null && !(serdes.getValue() instanceof NoOpSerde)) {
        msgSerdeMap.put(streamId, serdes.getValue());
      }
    }
  }
Serializes the {@link Serde} instances for operators, adds them to the provided config, and
sets the serde configuration for the input/output/intermediate streams appropriately.

We try to preserve the number of Serde instances before and after serialization. However we don't
guarantee that references shared between these serdes instances (e.g. an Jackson ObjectMapper shared
between two json serdes) are shared after deserialization too.

Ideally all the user defined objects in the application should be serialized and de-serialized in one pass
from the same output/input stream so that we can maintain reference sharing relationships.

@param configs the configs to add serialized serde instances and stream serde configs to
samza-core/src/main/java/org/apache/samza/execution/JobNodeConfigurationGenerator.java