code: def get_variable_getter(
      estimator_mode, features, fp16_predict, mixed_precision
  ):
      if (
          estimator_mode == tf.estimator.ModeKeys.TRAIN
          and mixed_precision
      ):
          custom_getter = mixed_precision_variable_getter
          features = tf.nest.map_structure(
              lambda feat: tf.cast(feat, tf.float16)
              if feat.dtype == tf.float32
              else feat,
              features,
          )
      elif (
          estimator_mode == tf.estimator.ModeKeys.PREDICT
          and fp16_predict
      ):
          custom_getter = fp16_variable_getter
          features = tf.nest.map_structure(
              lambda feat: tf.cast(feat, tf.float16)
              if feat.dtype == tf.float32
              else feat,
              features,
          )
      else:
          custom_getter = None
      return custom_getter, features
  
file_path: finetune/finetune/model.py
imports: import logging
  import numpy
  import tensorflow
  from finetune.nn.target_blocks import language_model, masked_language_model
  from finetune.util.text_generation import sample_with_temperature
  from finetune.util.optimize_loss import optimize_loss
  from finetune.util.imbalance import class_weight_tensor
  from finetune.errors import FinetuneError
  from finetune.base_models import GPTModel, GPTModelSmall
label_desc: Use image node_id 5 for calling a global function with example usage: get_variable_getter(estimator_mode, features, fp16_predict, mixed_precision) and returns: custom_getter,  features