Python - import 'contextlib.unittest'

Import contextmanager

To import contextmanager, Add the following line to the top of your code.

from contextlib import contextmanager