code: def map_sequence(stmts_in, **kwargs):
      from indra.preassembler.sitemapper import SiteMapper, default_site_map
      logger.info('Mapping sites on %d statements...' % len(stmts_in))
      kwarg_list = ['do_methionine_offset', 'do_orthology_mapping',
                    'do_isoform_mapping']
      sm = SiteMapper(default_site_map,
                      use_cache=kwargs.pop('use_cache', False),
                      **_filter(kwargs, kwarg_list))
      valid, mapped = sm.map_sites(stmts_in)
      correctly_mapped_stmts = []
      for ms in mapped:
          correctly_mapped = all([mm.has_mapping() for mm in ms.mapped_mods])
          if correctly_mapped:
              correctly_mapped_stmts.append(ms.mapped_stmt)
      stmts_out = valid + correctly_mapped_stmts
      logger.info('%d statements with valid sites' % len(stmts_out))
      dump_pkl = kwargs.get('save')
      if dump_pkl:
          dump_statements(stmts_out, dump_pkl)
      del sm
      return stmts_out