docs: def _to_dict(self):
          """Return a json dictionary representing this model."""
          _dict = {}
          if hasattr(self, 'text') and self.text is not None:
              _dict['text'] = self.text
          if hasattr(self, 'location') and self.location is not None:
              _dict['location'] = self.location._to_dict()
          if hasattr(self, 'level') and self.level is not None:
              _dict['level'] = self.level
          if hasattr(self,
                     'element_locations') and self.element_locations is not None:
              _dict['element_locations'] = [
                  x._to_dict() for x in self.element_locations
              ]
          return _dict