code: def testComponentSpecClass(self):
      class MissingSpecComponent(base_component.BaseComponent):
          EXECUTOR_SPEC = executor_spec.ExecutorClassSpec(
              base_executor.BaseExecutor
          )
  
      with self.assertRaisesRegex(
          TypeError, "Can't instantiate abstract class"
      ):
          MissingSpecComponent(
              spec=object()
          )  # pytype: disable=wrong-arg-types
  
      with self.assertRaisesRegex(
          TypeError,
          "expects SPEC_CLASS property to be a subclass of "
          "types.ComponentSpec",
      ):
          MissingSpecComponent._validate_component_class()
  
      class InvalidSpecComponent(base_component.BaseComponent):
          SPEC_CLASSES = object()
          EXECUTOR_SPEC = executor_spec.ExecutorClassSpec(
              base_executor.BaseExecutor
          )
  
      with self.assertRaisesRegex(
          TypeError,
          "expects SPEC_CLASS property to be a subclass of "
          "types.ComponentSpec",
      ):
          InvalidSpecComponent._validate_component_class()
  
imports: import tensorflow
  from tfx import types
  from tfx.dsl.components.base import base_component
  from tfx.dsl.components.base import base_executor
  from tfx.dsl.components.base import executor_spec
  from tfx.proto import example_gen_pb2
  from tfx.types import component_spec
  from tfx.types.system_executions import SystemExecution
  from tfx.utils import json_utils
label_desc: Use image node_id 4 for calling the ComponentTest obj's underlying member method code with example usage: obj.testComponentSpecClass() without return types