class_docstr: Class for composing individual encoding stages.
  
  This class provides functionality for arbitrarily composing individual
  encoding stages (implementations of `EncodingStageInterface` or
  `AdaptiveEncodingStageInterface`) into a tree, where an output `Tensor` of an
  encoding stage can be further encoded by another encoding stage.
  
  The interface is similar to that of `AdaptiveEncodingStageInterface`, with the
  additional methods `decode_before_sum` and `decode_after_sum`. These methods
  split the decoding functionality to two parts, based on commutativity with
  summation.
  
  Similar to the `AdaptiveEncodingStageInterface`, the methods are designed to
  be functional transformations. That means, for instance, that the
  `initial_state` and `update_state` methods do not modify any underlying state.
  Rather, the user of the `Encoder` class is responsible for storing any values
  if necessary, and providing them back to appropriate methods of this class.
docstr: Implementation for the `decode_after_sum` method.
docstr_tok: ["Implementation","for","the","`","decode_after_sum","`","method","."]
code: def _decode_after_sum_impl(
      self, encoded_tensors, decode_params, num_summands, shape
  ):
      """Implementation for the `decode_after_sum` method."""
      if not self.stage.commutes_with_sum:
          # This should have been decoded earlier in the decode_before_sum method.
          assert tf.is_tensor(encoded_tensors)
          return encoded_tensors
  
      temp_encoded_tensors = {}
      for key, value in six.iteritems(encoded_tensors):
          if key in self.children:
              with tf.compat.v1.name_scope(
                  None, "/".join([self.stage.name, key])
              ):
                  temp_encoded_tensors[key] = self.children[
                      key
                  ]._decode_after_sum_impl(  # pylint: disable=protected-access
                      value,
                      decode_params[EncoderKeys.CHILDREN][key],
                      num_summands,
                      shape[EncoderKeys.CHILDREN][key],
                  )
          else:
              temp_encoded_tensors[key] = value
      return self.stage.decode(
          temp_encoded_tensors,
          decode_params[EncoderKeys.PARAMS],
          num_summands=num_summands,
          shape=shape[EncoderKeys.SHAPE],
      )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import six
  import tensorflow
  from tensorflow_model_optimization.python.core.internal.tensor_encoding.core import encoding_stage
  from tensorflow_model_optimization.python.core.internal.tensor_encoding.utils import py_utils
label_desc: Use image node_id 18 for calling the Encoder obj's underlying member method code with example usage: obj._decode_after_sum_impl(encoded_tensors, decode_params, num_summands, shape) and returns: self, encoded_tensors