NVIDIA interview question

Write context manager in Python