code: def global_variable(
      initial_value, validate_shape=True, name=None, use_resource=None
  ):
      """Create a variable with a value and add it to `GraphKeys.GLOBAL_VARIABLES`.
  
      Args:
        initial_value: See variables.Variable.__init__.
        validate_shape: See variables.Variable.__init__.
        name: See variables.Variable.__init__.
        use_resource: If `True` use a ResourceVariable instead of a Variable.
  
      Returns:
        New variable.
      """
      return variable_scope.variable(
          initial_value,
          trainable=False,
          collections=[ops.GraphKeys.GLOBAL_VARIABLES],
          validate_shape=validate_shape,
          use_resource=use_resource,
          name=name,
      )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import functools
  import re
  from .arg_scope import add_arg_scope
  from tensorflow.core.protobuf import saver_pb2
  from tensorflow.python import pywrap_tensorflow
  from tensorflow.python.framework import device
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import ops
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import control_flow_ops
  from tensorflow.python.ops import resource_variable_ops
  from tensorflow.python.ops import variable_scope
  from tensorflow.python.ops import variables
  from tensorflow.python.platform import resource_loader
  from tensorflow.python.platform import tf_logging
  from tensorflow.python.training import saver
  from tensorflow.python.training import training_util
  from tensorflow.python.util.deprecation import deprecated
label_desc: Use image node_id 7 for calling a global function with example usage: global_variable(initial_value, validate_shape, name, use_resource) and returns: variable_scope