<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_mems(self, type):
 """Fetch all the memories of the supplied type"""

        ret = ()
        for m in self.mems:
            if m.type == type:
                ret += (m,)

        return ret