code: def get_var(name):
      """Get trainable variable by name."""
      variables = [
          var for var in tf.trainable_variables() if var.name == name
      ]
      if len(variables) == 1:
          return variables[0]
      raise ValueError(
          "`name` must match exactly one variable. '%s' matched %d"
          % (name, len(variables))
      )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import numpy
  from tensor2tensor.data_generators import problem_hparams
  from tensor2tensor.models import evolved_transformer
  from tensor2tensor.models import transformer
  import tensorflow.compat.v1
  from tensorflow.compat.v1 import estimator
label_desc: Use image node_id 2 for calling a global function with example usage: get_var(name) and returns: variables