text: from dataclasses import dataclass, field
  from typing import Optional, Union
  
  __NAMESPACE__ = "http://xsdtesting"
  
  
  @dataclass
  class B:
      c1: Optional[Union[int, bool]] = field(
          default=None,
          metadata={
              "type": "Element",
              "namespace": "http://xsdtesting",
          }
      )
      c2: Optional[object] = field(
          default=None,
          metadata={
              "type": "Element",
              "namespace": "http://xsdtesting",
          }
      )
  
  
  @dataclass
  class R:
      c1: Optional[Union[int, bool]] = field(
          default=None,
          metadata={
              "type": "Element",
              "namespace": "http://xsdtesting",
          }
      )
      c2: Optional[object] = field(
          default=None,
          metadata={
              "type": "Element",
              "namespace": "http://xsdtesting",
          }
      )
  
  
  @dataclass
  class Doc:
      class Meta:
          name = "doc"
          namespace = "http://xsdtesting"
  
      elem: Optional[R] = field(
          default=None,
          metadata={
              "type": "Element",
          }
      )
  