<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def filter(self, func):
 """Returns a SndRcv list filtered by a truth function"""

        return self.__class__( [ i for i in self.res if func(*i) ], name='filtered %s'%self.listname)