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