class_docstr: QuantizeConfig for RNN layers.
class_docstr_tok: ["QuantizeConfig","for","RNN","layers","."]
code: def set_quantize_activations(self, layer, quantize_activations):
      flattened_activation_attrs = self._flatten(self.activation_attrs)
      if len(flattened_activation_attrs) != len(quantize_activations):
          raise ValueError(
              "`set_quantize_activations` called on layer {} with {} "
              "activation parameters, but layer expects {} values.".format(
                  layer.name,
                  len(quantize_activations),
                  len(flattened_activation_attrs),
              )
          )
  
      i = 0
      for activation_attrs_cell, rnn_cell in zip(
          self.activation_attrs, self._get_rnn_cells(layer)
      ):
          for activation_attr in activation_attrs_cell:
              setattr(
                  rnn_cell, activation_attr, quantize_activations[i]
              )
              i += 1
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from typing import Any, Dict
  import tensorflow
  from tensorflow_model_optimization.python.core.quantization.keras import quantize_config
  from tensorflow_model_optimization.python.core.quantization.keras import quantize_registry
  from tensorflow_model_optimization.python.core.quantization.keras import quantizers
  from tensorflow_model_optimization.python.core.quantization.keras.experimental.default_n_bit import default_n_bit_quantize_configs
  from tensorflow_model_optimization.python.core.quantization.keras.experimental.default_n_bit import default_n_bit_quantizers
label_desc: Use image node_id 5 for calling the DefaultNBitQuantizeConfigRNN obj's underlying member method code with example usage: obj.set_quantize_activations(layer, quantize_activations) without return types