code: def get_variable_value(agent, name):
      """Returns the value of the trainable variable with the given name."""
      policy_vars = agent.policy.variables()
      tf_vars = [v for v in policy_vars if name in v.name]
      assert tf_vars, 'Variable "{}" does not exist. Found: {}'.format(
          name, policy_vars
      )
      if tf.executing_eagerly() and len(tf_vars) > 1:
          var = tf_vars[0]
      else:
          assert (
              len(tf_vars) == 1
          ), "More than one variable with name {}. {}".format(
              name, [(v.name, v.shape) for v in tf_vars]
          )
          var = tf_vars[0]
      return var.numpy() if tf.executing_eagerly() else var.eval()
  
imports: import datetime
  import os
  import time
  from typing import Dict, Optional, Tuple
  from absl import logging
  import numpy
  from six.moves import range
  from six.moves import zip
  import tensorflow
  from tensorflow.core.util import event_pb2
  from tensorflow.python.lib.io import tf_record
label_desc: Use image node_id 3 for calling a global function with example usage: get_variable_value(agent, name) and returns: unknown