<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, fn:PathOrStr, **kwargs):
        "Export the minimal state and save it in `fn` to load an empty version for inference."
        pickle.dump(self.get_state(**kwargs), open(fn, 'wb'))