class_docstr: Base test class for TensorFlow Lite 2.x model tests.
class_docstr_tok: ["Base","test","class","for","TensorFlow","Lite","2.x","model","tests","."]
code: def _getMultiFunctionModelWithSharedWeight(self):
      class BasicModelWithSharedWeight(autotrackable.AutoTrackable):
          """Model with multiple functions and a shared weight."""
  
          def __init__(self):
              self.weight = constant_op.constant(
                  [1.0], shape=(1, 512, 512, 1), dtype=dtypes.float32
              )
  
          @def_function.function
          def add(self, x):
              return x + self.weight
  
          @def_function.function
          def sub(self, x):
              return x - self.weight
  
          @def_function.function
          def mul(self, x):
              return x * self.weight
  
      return BasicModelWithSharedWeight()
  
imports: import os
  from absl.testing import parameterized
  import numpy
  import tensorflow
  from tensorflow.lite.python.interpreter import Interpreter
  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.framework import test_util
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import variables
  from tensorflow.python.trackable import autotrackable
label_desc: Use image node_id 6 for calling the ModelTest obj's underlying member method code with example usage: obj._getMultiFunctionModelWithSharedWeight() and returns: BasicModelWithSharedWeight, unknown, unknown, unknown