code: def test_auto_include_sub_component_in_config(self):
      config_json = json.loads(
          """
              {
                  "model": {"ModelFoo": {}},
                  "model_bar_x": {"ModelBar1": {}},
                  "model_union": {"ModelBar": {}},
                  "datahandler": {"SubDataHandler": {}}
              }
          """
      )
      config = config_from_json(TestConfig, config_json)
      self.assertEqual(config.model.foo, 2)
      self.assertEqual(config.model_bar_x.bar, "bar1")
      self.assertEqual(config.model_union.bar, "bar")
      self.assertEqual(config.datahandler.foo, 3)
  
imports: import json
  import unittest
  from typing import Union
  from pytext.config.component import Component, ComponentType, ConfigBase
  from pytext.config.serialize import config_from_json, config_to_json, ConfigParseError
label_desc: Use image node_id 1 for calling the ComponentTest obj's underlying member method code with example usage: obj.test_auto_include_sub_component_in_config() without return types