code: def asdict(self):
          
          return {
              "methods": {m.name: m.asdict() for m in self.methods},
              "protocols": self.protocols,
              "notifications": {n.name: n.asdict() for n in self.notifications},
          }
docs: Return dict presentation of this service.
  
          Useful for dumping the device information into JSON.