code: def _apply_nas_branch(
      norm,
      layer_norm_dict,
      hidden_states,
      nonpadding,
      hparams,
      input_index,
      layer_name,
      activation_name,
      layer_registry,
      output_dim,
      branch_scope_name,
      mask_future,
      dropout_broadcast_dims,
      encoder_decoder_attention_bias,
      encoder_cell_outputs,
      decoder_self_attention_bias,
      cell_number,
  ):
      """Applies a single NAS branch."""
      with tf.variable_scope(branch_scope_name):
          # Apply layer norm to an individual layer at most one time.
          if norm == LAYER_NORM_KEY:
              try:
                  output_tensor = layer_norm_dict[input_index]
              except KeyError:
                  output_tensor = _apply_layer_norm(
                      hidden_states[input_index], nonpadding, hparams
                  )
                  layer_norm_dict[input_index] = output_tensor
          elif norm == NO_NORM_KEY:
              output_tensor = hidden_states[input_index]
          else:
              raise ValueError(
                  "norm must be either '%s' or '%s'. Got %s"
                  % (LAYER_NORM_KEY, NO_NORM_KEY, norm)
              )
  
          layer_class = layer_registry.get(layer_name)
          activation = ACTIVATION_MAP[activation_name]
  
          postprocess_dropout = (
              layer_name != layers.IDENTITY_REGISTRY_KEY
          )
          output_tensor = layer_class.apply_layer(
              output_tensor,
              None,
              int(output_dim),
              activation,
              hparams,
              branch_scope_name,
              mask_future=mask_future,
              layer_preprocess_fn=None,
              postprocess_dropout=postprocess_dropout,
              nonpadding=nonpadding,
              attention_dropout_broadcast_dims=dropout_broadcast_dims,
              encoder_decoder_attention_bias=encoder_decoder_attention_bias,
              encoder_cell_outputs=encoder_cell_outputs,
              cell_number=cell_number,
              decoder_self_attention_bias=decoder_self_attention_bias,
          )
  
          return output_tensor
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import abc
  import six
  from tensor2tensor.layers import common_attention
  from tensor2tensor.layers import common_layers
  from tensor2tensor.models import transformer
  from tensor2tensor.models.neural_architecture_search import nas_layers
  from tensor2tensor.utils import contrib
  from tensor2tensor.utils import metrics
  from tensor2tensor.utils import registry
  from tensor2tensor.utils import t2t_model
  import tensorflow.compat.v1
  from tensorflow.compat.v1 import estimator
label_desc: Use image node_id 5 for calling a global function with example usage: _apply_nas_branch(norm, layer_norm_dict, hidden_states, nonpadding, hparams, input_index, layer_name, activation_name, layer_registry, output_dim, branch_scope_name, mask_future, dropout_broadcast_dims, encoder_decoder_attention_bias, encoder_cell_outputs, decoder__attention_bias, cell_number) and returns: output_tensor