code: def _map_agent_sites(self, agent):
          if agent is None or not agent.mods:
              return [], agent
          new_agent = deepcopy(agent)
          mapped_sites = []
          for idx, mod_condition in enumerate(agent.mods):
              mapped_site = \
                  self._map_agent_mod(agent, mod_condition)
              if not mapped_site or mapped_site.not_invalid():
                  continue
              if mapped_site.has_mapping():
                  mc = ModCondition(mod_condition.mod_type,
                                    mapped_site.mapped_res,
                                    mapped_site.mapped_pos,
                                    mod_condition.is_modified)
                  new_agent.mods[idx] = mc
              mapped_sites.append(mapped_site)
          return mapped_sites, new_agent