@staticmethod<EOL><INDENT>def merge_settings(settings, new_metadata_settings):<DEDENT>
for d in (settings, new_metadata_settings):<EOL><INDENT>if not isinstance(d, dict):<EOL><INDENT>raise TypeError('<STR_LIT>')<EOL><DEDENT><DEDENT>result_settings = deepcopy(settings)<EOL>if '<STR_LIT>' in new_metadata_settings and '<STR_LIT>' in result_settings:<EOL><INDENT>if new_metadata_settings['<STR_LIT>'].get('<STR_LIT>', None) and result_settings['<STR_LIT>'].get('<STR_LIT>', None):<EOL><INDENT>del result_settings['<STR_LIT>']['<STR_LIT>']<EOL><DEDENT>if new_metadata_settings['<STR_LIT>'].get('<STR_LIT>', None) and result_settings['<STR_LIT>'].get('<STR_LIT>', None):<EOL><INDENT>del result_settings['<STR_LIT>']['<STR_LIT>']<EOL><DEDENT><DEDENT>dict_deep_merge(result_settings, new_metadata_settings)<EOL>return result_settings<EOL>
Will update the settings with the provided new settings data extracted from the IdP metadata

:param settings: Current settings dict data
:type settings: string

:param new_metadata_settings: Settings to be merged (extracted from IdP metadata after parsing)
:type new_metadata_settings: string

:returns: merged settings
:rtype: dict