class_docstr: ``PreemptContext`` gives access to preemption signals that originate from a user action, such as
  pausing an experiment using the WebUI or the CLI, from in the Determined scheduler.
class_docstr_tok: ["``","PreemptContext","``","gives","access","to","preemption","signals","that","originate","from","a","user","action",",","such","as","pausing","an","experiment","using","the","WebUI","or","the","CLI",",","from","in","the","Determined","scheduler","."]
code: def __exit__(self, *_: Any) -> None:
      self.close()
  
imports: import enum
  import logging
  import threading
  import time
  from typing import Any, Optional
  import requests
  from determined import core
  from determined.common import api
label_desc: Use image node_id 5 for calling the PreemptContext obj's underlying member method code with example usage: obj.__exit__() without return types