code: def uniform_quantization(bits, **kwargs):
      """Returns uniform quanitzation `Encoder`.
  
      The `Encoder` first reshapes the input to a rank-1 `Tensor`, then applies
      uniform quantization with the extreme values being the minimum and maximum of
      the vector being encoded. Finally, the quantized values are bitpacked to an
      integer type.
  
      The `Encoder` is a composition of the following encoding stages:
      * `FlattenEncodingStage`
      * `UniformQuantizationEncodingStage`
      * `BitpackingEncodingStage`
  
      Args:
        bits: Number of bits to quantize into.
        **kwargs: Keyword arguments.
  
      Returns:
        The quantization `Encoder`.
      """
      return (
          core_encoder.EncoderComposer(
              stages_impl.BitpackingEncodingStage(bits)
          )
          .add_parent(
              stages_impl.UniformQuantizationEncodingStage(
                  bits, **kwargs
              ),
              stages_impl.UniformQuantizationEncodingStage.ENCODED_VALUES_KEY,
          )
          .add_parent(
              stages_impl.FlattenEncodingStage(),
              stages_impl.FlattenEncodingStage.ENCODED_VALUES_KEY,
          )
          .make()
      )
  
file_path: model-optimization/tensorflow_model_optimization/python/core/internal/tensor_encoding/encoders/common_encoders.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import tensorflow
  from tensorflow_model_optimization.python.core.internal.tensor_encoding.core import core_encoder
  from tensorflow_model_optimization.python.core.internal.tensor_encoding.core import gather_encoder
  from tensorflow_model_optimization.python.core.internal.tensor_encoding.core import simple_encoder
  from tensorflow_model_optimization.python.core.internal.tensor_encoding.stages import stages_impl
label_desc: Use image node_id 4 for calling a global function with example usage: uniform_quantization(bits) and returns: core_encoder