code: def get_decay_for_half(total_num_steps):
      decay = tf.minimum(
          tf.cast(tf.compat.v1.train.get_global_step(), tf.float32)
          / (total_num_steps / 2),
          1.0,
      )
      tf.compat.v1.summary.scalar("positional_decay_rate", decay)
      return decay
  
file_path: finetune/finetune/base_models/bert/featurizer.py
imports: import functools
  import tensorflow
  from finetune.util.shapes import lengths_from_eos_idx
  from finetune.base_models.bert.roberta_encoder import RoBERTaEncoder
  from finetune.base_models.bert.modeling import BertConfig, BertModel, LayoutLMModel, XDocModel, TwinBertModel
  from finetune.base_models.bert.table_utils import get_gather_indices, get_row_col_values, table_cross_row_col_mixing_fn, reassemble_sequence_feats
label_desc: Use image node_id 1 for calling a global function with example usage: get_decay_for_half(total_num_steps) and returns: decay