code: def to_struct(self):
          
          structobj = self.struct_type()
          for k in structobj.attributes():
              self.log.info("Setting attribute %s to %r" % (k, getattr(self, k)))
              setattr(structobj, k, getattr(self, k))
          return structobj
docs: Initialize properties of the appropriate struct class from this model class.