class_docstr: Tests for `_tf_style_*` decorators.
  
  The class decorators, `tf_style_encoding_stage` and
  `tf_style_adaptive_encoding_stage` are tested by the example implementations
  of `EncodingStageInterface` and `AdaptiveEncodingStageInterface`, in
  `test_utils.py`.
class_docstr_tok: ["Tests","for","`","_tf_style_","*","`","decorators",".","The","class","decorators",",","`","tf_style_encoding_stage","`","and","`","tf_style_adaptive_encoding_stage","`","are","tested","by","the","example","implementations","of","`","EncodingStageInterface","`","and","`","AdaptiveEncodingStageInterface","`",",","in","`","test_utils.py","`","."]
docstr: Test adaptive_get_params decorator works as expected.
docstr_tok: ["Test","adaptive_get_params","decorator","works","as","expected","."]
code: def test_adaptive_get_params_decorator(self, name):
      """Test adaptive_get_params decorator works as expected."""
      test_adaptive_get_params_fn = self._test_adaptive_get_params_fn()
      stage = self._get_mock_stage()
      state = {"state": 3.0}
      encode_params, decode_params = self.evaluate(
          test_adaptive_get_params_fn(stage, state, name)
      )
  
      # The graph should contain three nodes. Two for the constants created, and
      # one for the multiplication to create the params.
      graph = tf.compat.v1.get_default_graph()
      self.assertLen(graph.as_graph_def().node, 3)
      if name is not None:
          self._assert_all_graph_nodes_in_name_scope(graph, name)
      else:
          self._assert_all_graph_nodes_in_name_scope(
              graph, self._DEFAULT_NAME + "_get_params"
          )
      # The functionality is not modified.
      self.assertEqual(6.0, encode_params["param"])
      self.assertEqual(6.0, decode_params["param"])
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from absl.testing import parameterized
  import mock
  import numpy
  import tensorflow
  from tensorflow_model_optimization.python.core.internal.tensor_encoding.core import encoding_stage
  from tensorflow_model_optimization.python.core.internal.tensor_encoding.testing import test_utils
label_desc: Use image node_id 14 for calling the TFStyleEncodeDecodeTest obj's underlying member method code with example usage: obj.test_adaptive_get_params_decorator(name) without return types