class_docstr: Class for composing and creating `Encoder`.
  
  This class is a utility for separating the creation of the `Encoder` from its
  intended functionality. Each instance of `EncoderComposer` corresponds to a
  node in a tree of encoding stages to be used for encoding.
  
  The `make` method converts this object to an `Encoder`, which exposes the
  encoding functionality.
docstr: Constructor for the `EncoderComposer`.
  
  Args:
    stage: An `EncodingStageInterface` or an `AdaptiveEncodingStageInterface`.
docstr_tok: ["Constructor","for","the","`","EncoderComposer","`",".","Args",":","stage",":","An","`","EncodingStageInterface","`","or","an","`","AdaptiveEncodingStageInterface","`","."]
code: def __init__(self, stage):
      """Constructor for the `EncoderComposer`.
  
      Args:
        stage: An `EncodingStageInterface` or an `AdaptiveEncodingStageInterface`.
      """
      if not isinstance(
          stage,
          (
              encoding_stage.EncodingStageInterface,
              encoding_stage.AdaptiveEncodingStageInterface,
          ),
      ):
          raise TypeError(
              "The input argument is %s but must be an instance of "
              "EncodingStageInterface or of "
              "AdaptiveEncodingStageInterface" % type(stage)
          )
      self._stage = stage
      self._children = {}
      super(EncoderComposer, self).__init__()
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import six
  import tensorflow
  from tensorflow_model_optimization.python.core.internal.tensor_encoding.core import encoding_stage
  from tensorflow_model_optimization.python.core.internal.tensor_encoding.utils import py_utils
label_desc: Use image node_id 1 to create a new EncoderComposer object from inherited base classes: object with example: obj = EncoderComposer(stage)