code: def test_default_union(self):
      config_json = json.loads(
          """
              {
                  "task": {
                      "model": {
                          "Model2": {
                              "bar": "test"
                          }
                      }
  
                  },
                  "output": "foo/bar.pt"
              }
          """
      )
      config = config_from_json(PyTextConfig, config_json)
      self.assertTrue(isinstance(config.task, Task1))
      self.assertTrue(isinstance(config.task.model, Model2))
      self.assertEqual(config.task.model.bar, "test")
  
imports: import json
  import unittest
  from typing import List, Tuple, Union
  from pytext.config.component import Component, ComponentType
  from pytext.config.pytext_config import ConfigBase
  from pytext.config.serialize import config_from_json, config_to_json, ConfigParseError, MissingValueError, UnionTypeError
label_desc: Use image node_id 3 for calling the PytextConfigTest obj's underlying member method code with example usage: obj.test_default_union() without return types