code: def write_task(self, description, waypoints):
  
          
  
          if not self.in_task_section:
              self.write_line()
              self.write_line(self.DIVIDER)
              self.in_task_section = True
  
          fields = [self.escape(description)]
  
          for waypoint in waypoints:
              if waypoint not in self.wps:
                  raise ValueError(u'Waypoint "%s" was not found' % waypoint)
  
              fields.append(self.escape(waypoint))
  
          self.write_fields(fields)
docs: Write a task definition::
  
              writer.write_task('500 km FAI', [
                  'MEIER',
                  'BRILO',
                  'AILER',
                  'MEIER',
              ])
              # -> "500 km FAI","MEIER","BRILO","AILER","MEIER"
  
          Make sure that the referenced waypoints have been written with
          :meth:`~aerofiles.seeyou.Writer.write_waypoint` before writing the
          task. The task section divider will be written to automatically when
          :meth:`~aerofiles.seeyou.Writer.write_task` is called the first time.
          After the first task is written
          :meth:`~aerofiles.seeyou.Writer.write_waypoint` must not be called
          anymore.
  
          :param description: description of the task (may be blank)
          :param waypoints: list of waypoints in the task (names must match the
              long names of previously written waypoints)