code: def testTypeCheckWithRuntimeParameter(self):
      class SimpleComponentSpec(ComponentSpec):
          INPUTS = {}
          OUTPUTS = {}
          PARAMETERS = {
              "x": ExecutionParameter(type=int),
              "y": ExecutionParameter(type=int, optional=True),
          }
  
      parameter_int = data_types.RuntimeParameter(name="int", ptype=int)
      parameter_str = data_types.RuntimeParameter(name="str", ptype=str)
  
      _ = SimpleComponentSpec(x=parameter_int)
      with self.assertRaisesRegex(TypeError, "Expected type"):
          _ = SimpleComponentSpec(x=42, y=parameter_str)
  
      class ComponentSpecWithContainer(ComponentSpec):
          INPUTS = {}
          OUTPUTS = {}
          PARAMETERS = {
              "x": ExecutionParameter(type=Dict[str, str]),
              "y": ExecutionParameter(type=List[int]),
          }
  
      _ = ComponentSpecWithContainer(
          x={"key": parameter_str}, y=[parameter_int]
      )
      with self.assertRaisesRegex(TypeError, "Expected type"):
          _ = ComponentSpecWithContainer(x={"key": parameter_int}, y=[])
  
imports: from typing import Dict, List
  import tensorflow
  from tfx.orchestration import data_types
  from tfx.proto import example_gen_pb2
  from tfx.types.artifact import Artifact
  from tfx.types.channel import Channel
  from tfx.types.component_spec import ChannelParameter
  from tfx.types.component_spec import ComponentSpec
  from tfx.types.component_spec import ExecutionParameter
  from google.protobuf.json_format import ParseError
label_desc: Use image node_id 3 for calling the DataTypesTest obj's underlying member method code with example usage: obj.testTypeCheckWithRuntimeParameter() without return types