code: def buildFromState(
      self, state, docks, root, depth=0, missing="error"
  ):
      typ, contents, state = state
      if typ == "dock":
          try:
              obj = docks[contents]
              del docks[contents]
          except KeyError:
              if missing == "error":
                  raise Exception(
                      'Cannot restore dock state; no dock with name "%s"'
                      % contents
                  )
              elif missing == "create":
                  obj = Dock(name=contents)
              elif missing == "ignore":
                  return
              else:
                  raise ValueError(
                      '"missing" argument must be one of "error", "create", or "ignore".'
                  )
  
      else:
          obj = self.makeContainer(typ)
  
      root.insert(obj, "after")
  
      if typ != "dock":
          for o in contents:
              self.buildFromState(
                  o, docks, obj, depth + 1, missing=missing
              )
          # remove this container if possible. (there are valid situations when a restore will
          # generate empty containers, such as when using missing='ignore')
          obj.apoptose(propagate=False)
          obj.restoreState(state)
  
imports: import weakref
  from ..Qt import QtWidgets
  from .Container import Container, HContainer, TContainer, VContainer
  from .Dock import Dock
  from .DockDrop import DockDrop
label_desc: Use image node_id 17 for calling the DockArea obj's underlying member method code with example usage: obj.buildFromState(state, docks, root, depth, missing) without return types