code: def update(self):
          
          if "tag_groups" not in self._device_dict:
              return
          for group in self.tag_groups:
              group.update()
          for i in range(len(self._device_dict["tag_groups"])):
              tag_group_dict = self._device_dict["tag_groups"][i]
              for group in self.tag_groups:
                  if group.name == tag_group_dict["common.ALLTYPES_NAME"]:
                      self._device_dict["tag_groups"][i] = group.as_dict()
docs: Updates the dictionary of the device