code: def testProvideClass_Dataclass(self):
      @dataclasses.dataclass
      class Foo:
          x: int
          y: str
  
      mod = module.DependencyModule()
      mod.provide_class(Foo)
      mod.provide_value(42, name="x")
      mod.provide_value("foo", name="y")
  
      foo = mod.get(ANY_NAME, Foo)
      self.assertEqual(foo.x, 42)
      self.assertEqual(foo.y, "foo")
  
imports: import dataclasses
  from typing import Optional, Union
  import tensorflow
  from tfx.utils.di import errors
  from tfx.utils.di import module
label_desc: Use image node_id 16 for calling the ModuleTest obj's underlying member method code with example usage: obj.testProvideClass_Dataclass() without return types