code: def reduce_activities(stmts_in, **kwargs):
      
      logger.info('Reducing activities on %d statements...' % len(stmts_in))
      stmts_out = [deepcopy(st) for st in stmts_in]
      ml = MechLinker(stmts_out)
      ml.gather_explicit_activities()
      ml.reduce_activities()
      stmts_out = ml.statements
      dump_pkl = kwargs.get('save')
      if dump_pkl:
          dump_statements(stmts_out, dump_pkl)
      return stmts_out
docs: Reduce the activity types in a list of statements
  
      Parameters
      ----------
      stmts_in : list[indra.statements.Statement]
          A list of statements to reduce activity types in.
      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 reduced activity statements.