<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def export(self, folder_path, format=None):
 """ General purpose export method, gets file type from filepath extension Valid output formats currently are: Trackline: trackline or trkl or *.trkl Shapefile: shapefile or shape or shp or *.shp NetCDF: netcdf or nc or *.nc """


        if format is None:
            raise ValueError("Must export to a specific format, no format specified.")

        format = format.lower()

        if format == "trackline" or format[-4:] == "trkl":
            ex.Trackline.export(folder=folder_path, particles=self.particles, datetimes=self.datetimes)
        elif format == "shape" or format == "shapefile" or format[-3:] == "shp":
            ex.GDALShapefile.export(folder=folder_path, particles=self.particles, datetimes=self.datetimes)
        elif format == "netcdf" or format[-2:] == "nc":
            ex.NetCDF.export(folder=folder_path, particles=self.particles, datetimes=self.datetimes, summary=str(self))
        elif format == "pickle" or format[-3:] == "pkl" or format[-6:] == "pickle":
            ex.Pickle.export(folder=folder_path, particles=self.particles, datetimes=self.datetimes)