code: def build(self, root, schema):
          
          if schema.get("subcommands") and schema["subcommands"]:
              for subcmd, childSchema in schema["subcommands"].items():
                  child = CommandTree(node=subcmd)
                  child = self.build(child, childSchema)
                  root.children.append(child)
          # {args: {}, options: {}, help: ""}
          root.help = schema.get("help")
          for name, desc in schema.get("options").items():
              if root.node == "kubectl":  # register global flags
                  self.globalFlags.append(Option(name, desc["help"]))
              root.localFlags.append(Option(name, desc["help"]))
          for arg in schema.get("args"):
              node = CommandTree(node=arg)
              root.children.append(node)
          return root
docs: Build the syntax tree for kubectl command line