code: def create_tensor_variables():
      """Defines a scope in which `TensorVariable`s are created.
  
      >>> with snt.functional.variables():
      ...   v = tf.Variable(tf.ones([]), name="v")
      >>> v.tensor_value
      <tf.Tensor: ... numpy=1.0>
  
      Returns:
        A context manager that forces tf.Variable to create TensorVariables.
      """
  
      def getter(next_getter, **kwargs):
          del next_getter
          initial_value = tf.convert_to_tensor(kwargs["initial_value"])
          trainable = utils.first_non_none(kwargs["trainable"], True)
          name = utils.first_non_none(kwargs["name"], "Variable")
          name = utils.get_name_scope() + name + ":0"
          return TensorVariable(
              initial_value, trainable=trainable, name=name
          )
  
      return tf.variable_creator_scope(getter)
  
imports: import collections
  import functools
  import itertools
  import threading
  import contextlib
  from sonnet.src.functional import utils
  import tensorflow
label_desc: Use image node_id 9 for calling a global function with example usage: create_tensor_variables() and returns: tf, TensorVariable