code: def add_from_file(self, fpath):
          
          if self.tree is None:
              base, name = os.path.split(fpath)
              self.add_resource_path(base)
              self.tree = tree = ET.parse(fpath)
              self.root = tree.getroot()
              self.objects = {}
          else:
              # TODO: append to current tree
              pass
docs: Load ui definition from file.