code: def filter_direct(stmts_in, **kwargs):
      def get_is_direct(stmt):
          any_indirect = False
          for ev in stmt.evidence:
              if ev.epistemics.get('direct') is True:
                  return True
              elif ev.epistemics.get('direct') is False:
                  any_indirect = True
          if any_indirect:
              return False
          return True
      logger.info('Filtering %d statements to direct ones...' % len(stmts_in))
      stmts_out = []
      for st in stmts_in:
          if get_is_direct(st):
              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