(self, new_content, suffix=None, suffix_sep="_")
Merge new content into model summary
        Parameters
        ----------
        new_content: dict, content to be merged into summary
        suffix: str or None, suffix used to create new key if any key in new_content already exixts in model summary
        suffix_sep: string, default '_', suffix separator used to create new key

        Returns
        -------
Merge new content into model summary
        Parameters
        ----------
        new_content: dict, content to be merged into summary
        suffix: str or None, suffix used to create new key if any key in new_content already exixts in model summary
        suffix_sep: string, default '_', suffix separator used to create new key
Merge new content into model summary Parameters ---------- new_content : dict content to be merged into summary suffix : str or None suffix used to create new key if any key in new_content already exixts in model summary suffix_sep : string default _ suffix separator used to create new key
def merge_summary(self, new_content, suffix=None, suffix_sep="_"):
        """
        Merge new content into model summary
        Parameters
        ----------
        new_content: dict, content to be merged into summary
        suffix: str or None, suffix used to create new key if any key in new_content already exixts in model summary
        suffix_sep: string, default '_', suffix separator used to create new key

        Returns
        -------

        """

        if not isinstance(new_content, dict):
            raise ValueError(
                f"To merge new content into model summary, "
                f"value must be of dict type, received {type(new_content)} instead."
            )
        new_summary = self.summary()
        keyset = new_summary.keys() | new_content.keys()
        for key in keyset:
            if key in new_summary and key in new_content:
                if suffix is not None:
                    new_key = f"{key}{suffix_sep}{suffix}"
                else:
                    new_key = key
                new_value = new_content.get(key)
                new_summary[new_key] = new_value
            elif key in new_content:
                new_summary[key] = new_content.get(key)
            else:
                pass
        self.set_summary(new_summary)
def merge_summary ( self , new_content , suffix = None , suffix_sep = "_" ) : if not isinstance ( new_content , dict ) : raise ValueError ( f"To merge new content into model summary, " f"value must be of dict type, received {type(new_content)} instead." ) new_summary = self . summary ( ) keyset = new_summary . keys ( ) | new_content . keys ( ) for key in keyset : if key in new_summary and key in new_content : if suffix is not None : new_key = f"{key}{suffix_sep}{suffix}" else : new_key = key new_value = new_content . get ( key ) new_summary [ new_key ] = new_value elif key in new_content : new_summary [ key ] = new_content . get ( key ) else : pass self . set_summary ( new_summary )