code: def test_nas_decoder_resizing_output(self):
      hparams, wrong_size = self._get_wrong_output_dim_decoder_hparams()
      hparams.enforce_output_size = False
      input_tensor = tf.zeros(
          [_BATCH_SIZE, _INPUT_LENGTH, _EMBEDDING_DEPTH]
      )
      decoder_self_attention_bias = (
          common_attention.attention_bias_lower_triangle(_INPUT_LENGTH)
      )
      with tf.variable_scope("wrong"):
          wrong_size_decoder_output = translation_nas_net.nas_decoder(
              decoder_input=input_tensor,
              encoder_cell_outputs=[input_tensor]
              * hparams.encoder_num_cells,
              decoder_self_attention_bias=decoder_self_attention_bias,
              encoder_decoder_attention_bias=None,
              hparams=hparams,
          )
  
      # Now add the correction.
      hparams.enforce_output_size = True
      with tf.variable_scope("correct"):
          correct_size_decoder_output = translation_nas_net.nas_decoder(
              decoder_input=input_tensor,
              encoder_cell_outputs=[input_tensor]
              * hparams.encoder_num_cells,
              decoder_self_attention_bias=decoder_self_attention_bias,
              encoder_decoder_attention_bias=None,
              hparams=hparams,
          )
  
      with self.test_session() as session:
          session.run(tf.global_variables_initializer())
          wrong_output, correct_output = session.run(
              [wrong_size_decoder_output, correct_size_decoder_output]
          )
      self.assertEqual(
          wrong_output.shape, (_BATCH_SIZE, _INPUT_LENGTH, wrong_size)
      )
      self.assertEqual(
          correct_output.shape,
          (_BATCH_SIZE, _INPUT_LENGTH, _EMBEDDING_DEPTH),
      )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from absl.testing import parameterized
  import numpy
  from tensor2tensor.data_generators import problem_hparams
  from tensor2tensor.layers import common_attention
  from tensor2tensor.models import transformer
  from tensor2tensor.models.neural_architecture_search import nas_layers
  from tensor2tensor.models.neural_architecture_search import nas_model
  import tensorflow.compat.v1
  from tensorflow.compat.v1 import estimator
label_desc: Use image node_id 5 for calling the NasSeq2SeqTest obj's underlying member method code with example usage: obj.test_nas_decoder_resizing_output() without return types