<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def set_context(self, new_context):
 """Assigns the new context to the member variable ``_context``."""

        self._context = new_context

        if hasattr(self, '_set_logging_context'):
            self._set_logging_context(self._context)