def map_statements(self):
        for stmt in self.statements:
            for agent in stmt.agent_list():
                if agent is None:
                    continue
                all_mappings = []
                for db_name, db_id in agent.db_refs.items():
                    if isinstance(db_id, list):
                        db_id = db_id[0][0]
                    mappings = self._map_id(db_name, db_id)
                    all_mappings += mappings
                for map_db_name, map_db_id, score, orig_db_name in all_mappings:
                    if map_db_name in agent.db_refs:
                        continue
                    if self.scored:
                        try:
                            orig_score = agent.db_refs[orig_db_name][0][1]
                        except Exception:
                            orig_score = 1.0
                        agent.db_refs[map_db_name] = \
                            [(map_db_id, score * orig_score)]
                    else:
                        if map_db_name in ('UN', 'HUME'):
                            agent.db_refs[map_db_name] = [(map_db_id, 1.0)]
                        else:
                            agent.db_refs[map_db_name] = map_db_id