code: def filter_direct(stmts_in, **kwargs):
      
      def get_is_direct(stmt):
          """Returns true if there is evidence that the statement is a direct
          interaction.
  
          If any of the evidences associated with the statement
          indicates a direct interatcion then we assume the interaction
          is direct. If there is no evidence for the interaction being indirect
          then we default to direct.
          """
          any_indirect = False
          for ev in stmt.evidence:
              if ev.epistemics.get('direct') is True:
                  return True
              elif ev.epistemics.get('direct') is False:
                  # This guarantees that we have seen at least
                  # some evidence that the statement is indirect
                  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
docs: Filter to statements that are direct interactions
  
      Parameters
      ----------
      stmts_in : list[indra.statements.Statement]
          A list of statements to filter.
      save : Optional[str]
          The name of a pickle file to save the results (stmts_out) into.
  
      Returns
      -------
      stmts_out : list[indra.statements.Statement]
          A list of filtered statements.