code: def simple_scoped_fn(a, x):
      """Simple function: (a, x) -> 2(x+a), but with "2" as a variable in scope."""
      with variable_scope.variable_scope("body"):
          # Dummy variable, just to check that scoping works as intended.
          two = variable_scope.get_variable(
              "two",
              [],
              dtype=dtypes.int32,
              initializer=init_ops.constant_initializer(2),
          )
          return math_ops.multiply(math_ops.add(a, x), two)
  
imports: import numpy
  from tensorflow.python.eager import context
  from tensorflow.python.eager import def_function
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import sparse_tensor
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import gradients_impl
  from tensorflow.python.ops import init_ops
  from tensorflow.python.ops import map_fn
  from tensorflow.python.ops import math_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.ops.ragged import ragged_factory_ops
  from tensorflow.python.ops.ragged import ragged_tensor
  import tensorflow.python.ops.tensor_array_grad
  from tensorflow.python.platform import test
label_desc: Use image node_id 1 for calling a global function with example usage: simple_scoped_fn(a, x) and returns: math_ops