class_docstr: Interface for the core of encoding logic.
  
  This core interface should support encoding being executed in a variety of
  contexts. For instance,
  * Both encoding and decoding can happen in the same location, such as for
    experimental evaluation of efficiency.
  * Both encoding and decoding can happen in different locations, but run in the
    same `Session`, such as distributed datacenter training.
  * Encoding and decoding can happen in multiple locations, and communication
    between them needs to happen outside of `TensorFlow`, such as compressing
    a state of a model which is sent to a mobile device to be later used for
    inference.
  
  This interface is designed such that its implementer need not worry about the
  potential communication patterns, and the implementation will support all.
  
  Each implementation of this interface is supposed to be a relatively
  elementary transformation. In particular, it does not need to realize any
  representation savings by itself. Instead, a particular compositions of these
  elementary transformations will realize the desired savings. These
  compositions are realized by the `Encoder` class.
  
  Each implementation should also be wrapped by `tf_style_encoding_stage` to
  ensure adherence to the TensorFlow style guide. The adherence is enforced by
  the `BaseEncodingStageTest` test class. See `test_utils.py` for more details.
  
  For an adaptive version with a broader interface, see
  `AdaptiveEncodingStageInterface`.
docstr: `True/False` based on whether the encoding commutes with sum.
  
  Iff `True`, it means that given multiple inputs `x` with the same `shape`
  and `dtype`, and the same `params` argument of the `encode` method, the
  implementation is such that every value in the returned `encoded_tensors`
  can be first summed, before being passed to the decoding functionality, and
  the output should be identical (up to numerical precision) to summing the
  fully decoded `Tensor` objects.
  
  Note that this also assumes that each of the `decode` methods would be used
  with the same values of `decode_params`.
  
  Returns:
    A boolean, `True` iff the encoding commutes with sum.
docstr_tok: ["`","True\/False","`","based","on","whether","the","encoding","commutes","with","sum",".","Iff","`","True","`",",","it","means","that","given","multiple","inputs","`","x","`","with","the","same","`","shape","`","and","`","dtype","`",",","and","the","same","`","params","`","argument","of","the","`","encode","`","method",",","the","implementation","is","such","that","every","value","in","the","returned","`","encoded_tensors","`","can","be","first","summed",",","before","being","passed","to","the","decoding","functionality",",","and","the","output","should","be","identical","(","up","to","numerical","precision",")","to","summing","the","fully","decoded","`","Tensor","`","objects",".","Note","that","this","also","assumes","that","each","of","the","`","decode","`","methods","would","be","used","with","the","same","values","of","`","decode_params","`",".","Returns",":","A","boolean",",","`","True","`","iff","the","encoding","commutes","with","sum","."]
code: def commutes_with_sum(self):
      """`True/False` based on whether the encoding commutes with sum.
  
      Iff `True`, it means that given multiple inputs `x` with the same `shape`
      and `dtype`, and the same `params` argument of the `encode` method, the
      implementation is such that every value in the returned `encoded_tensors`
      can be first summed, before being passed to the decoding functionality, and
      the output should be identical (up to numerical precision) to summing the
      fully decoded `Tensor` objects.
  
      Note that this also assumes that each of the `decode` methods would be used
      with the same values of `decode_params`.
  
      Returns:
        A boolean, `True` iff the encoding commutes with sum.
      """
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import abc
  import enum
  import six
  import tensorflow
label_desc: Use image node_id 3 for calling the EncodingStageInterface obj's underlying member method code with example usage: obj.commutes_with_sum() without return types