code: def make_var_scope_custom_getter_for_ema(ema):
      """Makes variable scope custom getter."""
  
      def _custom_getter(getter, name, *args, **kwargs):
          var = getter(name, *args, **kwargs)
          ema_var = ema.average(var)
          return ema_var if ema_var else var
  
      return _custom_getter
  
imports: import os
  import time
  from absl import logging
  from magenta.models.gansynth.lib import networks
  import numpy
  import tensorflow.compat.v1
  import tensorflow_gan
label_desc: Use image node_id 12 for calling a global function with example usage: make_var_scope_custom_getter_for_ema(ema) and returns: _custom_getter, unknown