def activate_subproject(self, subproject):
if subproject is None:<EOL><INDENT>raise TypeError("<STR_LIT>"<EOL>"<STR_LIT>")<EOL><DEDENT>previous = [(k, v) for k, v in self.items() if not k.startswith("<STR_LIT:_>")]<EOL>conf_file = self.config_file<EOL>self.__init__(conf_file, subproject)<EOL>for k, v in previous:<EOL><INDENT>if k.startswith("<STR_LIT:_>"):<EOL><INDENT>continue<EOL><DEDENT>if k not in self or (self.is_null(k) and v is not None):<EOL><INDENT>_LOGGER.debug("<STR_LIT>".format(k, v))<EOL>self[k] = v<EOL><DEDENT><DEDENT>self._subproject = subproject<EOL>return self<EOL>
Update settings based on subproject-specific values.

This method will update Project attributes, adding new values
associated with the subproject indicated, and in case of collision with
an existing key/attribute the subproject's value will be favored.

:param str subproject: A string with a subproject name to be activated
:return peppy.Project: Updated Project instance