code: def testFlatExecutionInfoProvider_ArtifactCompositeType(self):
      m = module.DependencyModule()
      m.add_provider(
          di_providers.FlatExecutionInfoProvider(["zero", "one", "two"])
      )
      m.provide_value(
          data_types.ExecutionInfo(
              input_dict={
                  "zero": [],
                  "one": [Foo(1)],
                  "two": [Foo(1), Foo(2)],
              }
          )
      )
  
      with self.subTest(
          "Artifact type can change as long as TYPE_NAME is same."
      ):
          self.assertIsInstance(m.get("one", Foo), Foo)
          self.assertIsInstance(m.get("one", IAmAlsoFoo), IAmAlsoFoo)
          with self.assertRaises(errors.InvalidTypeHintError):
              m.get("one", Bar)
  
      with self.subTest("Optional[T]"):
          self.assertIsNone(m.get("zero", Optional[Foo]))
          self.assertEqual(m.get("one", Optional[Foo]), Foo())
          with self.assertRaises(errors.InvalidTypeHintError):
              m.get("two", Optional[Foo])
  
      with self.subTest("list[T] or Sequence[T]"):
          self.assertLen(
              m.get("zero", list[Foo]), 0
          )  # pylint: disable=g-generic-assert
          self.assertLen(m.get("one", list[Foo]), 1)
          self.assertLen(m.get("two", list[Foo]), 2)
          self.assertLen(m.get("two", Sequence[Foo]), 2)
  
      with self.subTest("No type_hint"):
          self.assertEqual(m.get("zero", None), [])
          self.assertEqual(m.get("one", None), [Foo(1)])
          self.assertEqual(m.get("two", None), [Foo(1), Foo(2)])
  
imports: from collections.abc import Sequence
  from typing import Optional
  import tensorflow
  from tfx.orchestration.portable import data_types
  from tfx.orchestration.portable.execution import di_providers
  from tfx.types import artifact
  from tfx.utils.di import errors
  from tfx.utils.di import module
label_desc: Use image node_id 4 for calling the ProvidersTest obj's underlying member method code with example usage: obj.testFlatExecutionInfoProvider_ArtifactCompositeType() without return types