code: def filter_genes_only(stmts_in, **kwargs):
      remove_bound = 'remove_bound' in kwargs and kwargs['remove_bound']
      specific_only = kwargs.get('specific_only')
      logger.info('Filtering %d statements for ones containing genes only...' % 
                  len(stmts_in))
      stmts_out = []
      for st in stmts_in:
          genes_only = True
          for agent in st.agent_list():
              if agent is not None:
                  criterion = lambda a: _agent_is_gene(a, specific_only)
                  if not criterion(agent):
                      genes_only = False
                      break
                  if remove_bound:
                      _remove_bound_conditions(agent, criterion)
                  else:
                      if _any_bound_condition_fails_criterion(agent, criterion):
                          genes_only = False
                          break
          if genes_only:
              stmts_out.append(st)
      logger.info('%d statements after filter...' % len(stmts_out))
      dump_pkl = kwargs.get('save')
      if dump_pkl:
          dump_statements(stmts_out, dump_pkl)
      return stmts_out