code: def validate(self):
          
          required_fields = list(filter(lambda x: self._fields[x], self._fields.keys()))
          for field in (self._top_fields + required_fields):
              if not hasattr(self, field) or hasattr(self, field) and getattr(self, field) == None:
                  raise MissingFieldError(field)
docs: Validate the message.
  
          Ensure all the required fields are present and not None.