code: def wkt_polygon(value):
      
      points = ['%s %s' % (lon, lat) for lon, lat, dep in coordinates(value)]
      # close the linear polygon ring by appending the first coord to the end
      points.append(points[0])
      return 'POLYGON((%s))' % ', '.join(points)
docs: Convert a string with a comma separated list of coordinates into
      a WKT polygon, by closing the ring.