def METHOD_NAME(self, path):
    if self._slashrc is not None:
        slashrc_path = os.path.join(path, self._slashrc.get_relative_path())
    else:
        slashrc_path = None
    with get_temporary_slashrc_context(slashrc_path):
        yield