code: def _tf_style_adaptive_get_params(get_params_fn):
      """Method decorator for `tf_style_adaptive_encoding_stage`."""
  
      def actual_get_params_fn(self, state, name=None):
          """Modified `get_params` method."""
          with tf.compat.v1.name_scope(
              name, self.name + GET_PARAMS_SCOPE_SUFFIX, state.values()
          ):
              state = tf.nest.map_structure(tf.convert_to_tensor, state)
              return get_params_fn(self, state, name=name)
  
      return actual_get_params_fn
  
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 6 for calling a global function with example usage: _tf_style_adaptive_get_params(get_params_fn) and returns: actual_get_params_fn, get_params_fn