code: def _set_xml_from_keys(self, root, item, **kwargs):
          
          key, val = item
          target_key = root.find(key)
          if target_key is None:
              target_key = ElementTree.SubElement(root, key)
  
          if isinstance(val, dict):
              for dict_item in val.items():
                  self._set_xml_from_keys(target_key, dict_item, **kwargs)
              return
  
          # Convert kwarg data to the appropriate string.
          if key in kwargs:
              kwarg = kwargs[key]
              if isinstance(kwarg, bool):
                  kwargs[key] = str(kwargs[key]).lower()
              elif kwarg is None:
                  kwargs[key] = ""
              elif isinstance(kwarg, int):
                  kwargs[key] = str(kwargs[key])
              elif isinstance(kwarg, JSSObject):
                  kwargs[key] = kwargs[key].name
  
          target_key.text = kwargs.get(key, val)
docs: Create SubElements of root with kwargs.
  
          Args:
              root: Element to add SubElements to.
              item: Tuple key/value pair from self.data_keys to add.
              kwargs:
                  For each item in self.data_keys, if it has a
                  corresponding kwarg, create a SubElement at root with
                  the kwarg's value.
  
                  Int and bool values will be cast to string. (Int 10,
                  bool False become string values "10" and "false").
  
                  Dicts will be recursively added to their key's Element.