code: def togpx(self):
          
          element = create_elem(self.__class__._elem_name,
                                {'lat': str(self.latitude),
                                 'lon': str(self.longitude)})
          if self.name:
              element.append(create_elem('name', text=self.name))
          if self.description:
              element.append(create_elem('desc', text=self.description))
          if self.elevation:
              element.append(create_elem('ele', text=str(self.elevation)))
          if self.time:
              element.append(create_elem('time', text=self.time.isoformat()))
          return element
docs: Generate a GPX waypoint element subtree.
  
          Returns:
              etree.Element: GPX element