code: def testBeamDecodeWithRelativeAttention(self):
      decode_length = 2
      model, features = get_model(
          transformer.transformer_relative_tiny()
      )
      model.set_mode(tf_estimator.ModeKeys.PREDICT)
  
      beam_result = model._beam_decode(
          features, decode_length, beam_size=4, top_beams=1, alpha=1.0
      )["outputs"]
  
      with self.test_session():
          tf.global_variables_initializer().run()
          beam_result.eval()
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import numpy
  from tensor2tensor.data_generators import librispeech
  from tensor2tensor.data_generators import problem_hparams
  from tensor2tensor.models import transformer
  import tensorflow.compat.v1
  from tensorflow.compat.v1 import estimator
label_desc: Use image node_id 9 for calling the TransformerTest obj's underlying member method code with example usage: obj.testBeamDecodeWithRelativeAttention() without return types