code: def tf_style_encoding_stage(cls):
      """Decorator for implementations of `EncodingStageInterface`.
  
      This decorator ensures adherence to the TensorFlow style guide, and should be
      used to decorate every implementation of `EncodingStageInterface`. In
      particular, it captures the methods of the interface in appropriate name
      scopes or variable scopes, and calls `tf.convert_to_tensor` on the provided
      inputs.
  
      For `get_params`, `encode` and `decode` methods, it adds an optional `name`
      argument with default value `None`, as per the style guide.
  
      Args:
        cls: The class to be decorated. Must be an `EncodingStageInterface`.
  
      Returns:
        Decorated class.
  
      Raises:
        TypeError: If `cls` is not an `EncodingStageInterface`.
      """
  
      if not issubclass(cls, EncodingStageInterface):
          raise TypeError(
              "Unable to decorate %s. Provided class must be a subclass "
              "of EncodingStageInterface." % cls
          )
  
      class TFStyleEncodingStage(cls):
          """The decorated encoding stage."""
  
          def __init__(self, *args, **kwargs):
              self._wrapped_class = cls(*args, **kwargs)
  
          def __getattr__(self, attr):
              return self._wrapped_class.__getattribute__(attr)
  
          @_tf_style_get_params
          def get_params(self, name=None):
              return super(TFStyleEncodingStage, self).get_params()
  
          @_tf_style_encode
          def encode(self, x, encode_params, name=None):
              return super(TFStyleEncodingStage, self).encode(
                  x, encode_params
              )
  
          @_tf_style_decode
          def decode(
              self,
              encoded_tensors,
              decode_params,
              num_summands=None,
              shape=None,
              name=None,
          ):
              return super(TFStyleEncodingStage, self).decode(
                  encoded_tensors, decode_params, num_summands, shape
              )
  
      return TFStyleEncodingStage
  
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 1 for calling a global function with example usage: tf_style_encoding_stage(cls) and returns: TFStyleEncodingStage, self, super, super, super