<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def context(self, mapping_class=DotDictWithAcquisition):
 """return a config as a context that calls close on every item when it goes out of scope"""

        config = None
        try:
            config = self.get_config(mapping_class=mapping_class)
            yield config
        finally:
            if config:
                self._walk_and_close(config)