<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def read_pickles (self):
 """Generate a sequence of objects by opening the path and unpickling items until EOF is reached. """

        try:
            import cPickle as pickle
        except ImportError:
            import pickle

        with self.open (mode='rb') as f:
            while True:
                try:
                    obj = pickle.load (f)
                except EOFError:
                    break
                yield obj