code: def get_groups_dict(self) -> Dict:
          
          return {
              k: deserializer.inventory.InventoryElement.serialize(v).dict()
              for k, v in self.groups.items()
          }
docs: Returns serialized dictionary of groups from inventory