<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(cls, folder, particles, datetimes):
 """ Export particle and datetime data to Pickled objects. This can be used to debug or to generate different output in the future. """

        if not os.path.exists(folder):
            os.makedirs(folder)

        particle_path = os.path.join(folder, 'particles.pickle')
        f = open(particle_path, "wb")
        pickle.dump(particles, f)
        f.close()

        datetimes_path = os.path.join(folder, 'datetimes.pickle')
        f = open(datetimes_path, "wb")
        pickle.dump(datetimes, f)
        f.close()