Pergunta de entrevista da empresa Argyle

What is the purpose of a context manager in Python?