code: def _gen_uninitialized_variable(base_dir):
      """Generates a saved model with an uninitialized variable."""
  
      class SubModule(module.Module):
          """A module with an UninitializedVariable."""
  
          def __init__(self):
              self.uninitialized_variable = (
                  resource_variable_ops.UninitializedVariable(
                      name="uninitialized_variable", dtype=dtypes.int64
                  )
              )
  
      class Module(module.Module):
          """A module with an UninitializedVariable."""
  
          def __init__(self):
              super(Module, self).__init__()
              self.sub_module = SubModule()
              self.initialized_variable = variables.Variable(
                  1.0, name="initialized_variable"
              )
              # An UninitializedVariable with the same name as the variable in the
              # SubModule, but with a different type.
              self.uninitialized_variable = (
                  resource_variable_ops.UninitializedVariable(
                      name="uninitialized_variable",
                      dtype=dtypes.float32,
                  )
              )
  
          @def_function.function(
              input_signature=[
                  tensor_spec.TensorSpec((), dtypes.float32)
              ]
          )
          def compute(self, value):
              return self.initialized_variable + value
  
      to_save = Module()
      saved_model.save(
          to_save,
          export_dir=os.path.join(base_dir, "UninitializedVariable"),
      )
  
file_path: tensorflow-upstream/tensorflow/c/experimental/saved_model/internal/testdata/gen_saved_models.py
imports: import os
  from absl import app
  from tensorflow.python.compat import v2_compat
  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 tensor_spec
  from tensorflow.python.module import module
  from tensorflow.python.ops import resource_variable_ops
  from tensorflow.python.ops import variables
  from tensorflow.python.ops import while_loop
  from tensorflow.python.saved_model import saved_model
label_desc: Use image node_id 1 for calling a global function with example usage: _gen_uninitialized_variable(base_dir) and returns: unknown