class_docstr: This shows how to rewrite a monolith function so that it can handle preemption nicely,
  and not restart from scratch everytime it's preempted.
class_docstr_tok: ["This","shows","how","to","rewrite","a","monolith","function","so","that","it","can","handle","preemption","nicely",",","and","not","restart","from","scratch","everytime","it","'s","preempted","."]
code: def checkpoint(self, *args, **kwargs):
      print(f"Checkpointing at stage '{self.stage}'")
      return super().checkpoint(*args, **kwargs)
  
file_path: submitit/docs/mnist.py
imports: import functools
  import pickle
  import time
  from pathlib import Path
  import numpy
  from sklearn.datasets import fetch_openml
  from sklearn.linear_model import LogisticRegression
  from sklearn.model_selection import train_test_split
  from sklearn.preprocessing import StandardScaler
  from sklearn.utils import check_random_state
  import submitit
label_desc: Use image node_id 3 for calling the MnistTrainer obj's underlying member method code with example usage: obj.checkpoint() and returns: super