code: def test_add_parent(self):
      encoder = (
          core_encoder.EncoderComposer(
              test_utils.ReduceMeanEncodingStage()
          )
          .add_parent(test_utils.PlusOneEncodingStage(), P1_VALS)
          .add_parent(test_utils.TimesTwoEncodingStage(), T2_VALS)
          .make()
      )
  
      self.assertIsInstance(encoder, core_encoder.Encoder)
      self.assertIsInstance(
          encoder.stage._wrapped_stage, test_utils.TimesTwoEncodingStage
      )
      self.assertIsInstance(
          encoder.children[T2_VALS], core_encoder.Encoder
      )
      self.assertIsInstance(
          encoder.children[T2_VALS].stage._wrapped_stage,
          test_utils.PlusOneEncodingStage,
      )
      self.assertIsInstance(
          encoder.children[T2_VALS].children[P1_VALS],
          core_encoder.Encoder,
      )
      self.assertIsInstance(
          encoder.children[T2_VALS]
          .children[P1_VALS]
          .stage._wrapped_stage,
          test_utils.ReduceMeanEncodingStage,
      )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import collections
  import numpy
  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 encoding_stage
  from tensorflow_model_optimization.python.core.internal.tensor_encoding.testing import test_utils
label_desc: Use image node_id 1 for calling the EncoderComposerTest obj's underlying member method code with example usage: obj.test_add_parent() without return types