def retain_identities(self, retention_time):
enrich_es = self.conf['<STR_LIT>']['<STR_LIT:url>']<EOL>sortinghat_db = self.db<EOL>current_data_source = self.get_backend(self.backend_section)<EOL>active_data_sources = self.config.get_active_data_sources()<EOL>if retention_time is None:<EOL><INDENT>logger.debug("<STR_LIT>")<EOL>return<EOL><DEDENT>if retention_time <= <NUM_LIT:0>:<EOL><INDENT>logger.debug("<STR_LIT>")<EOL>return<EOL><DEDENT>retain_identities(retention_time, enrich_es, sortinghat_db, current_data_source, active_data_sources)<EOL>
Retain the identities in SortingHat based on the `retention_time`
        value declared in the setup.cfg.

        :param retention_time: maximum number of minutes wrt the current date to retain the SortingHat data